diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d08bc7d..d7137a3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,4 +26,4 @@ jobs: ORG_GRADLE_PROJECT_mavenPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} uses: burrunan/gradle-cache-action@v1 with: - arguments: publish --no-configuration-cache \ No newline at end of file + arguments: publish --no-configuration-cache diff --git a/README.md b/README.md index 64badfd..d12b8a1 100644 --- a/README.md +++ b/README.md @@ -13,15 +13,36 @@ pattern. ## Prerequisites +### PostgreSQL + PostgreSQL version 13.12 or later. Note 13.12 is the earliest one that this library is tested against at the time of writing. In theory, it may work with PostgreSQL 9.5 and above. +### Logical replication enabled + Logical replication must be [configured](https://www.postgresql.org/docs/current/logical-replication-config.html#LOGICAL-REPLICATION-CONFIG-PUBLISHER) on the PostgreSQL server. If you are using AWS Aurora, see [here](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Replication.Logical.html#AuroraPostgreSQL.Replication.Logical.Configure) for instructions to enable logical replication. +### [wal2json](https://github.com/eulerto/wal2json) plugin installed + +This library relies on the [wal2json](https://github.com/eulerto/wal2json) PostgreSQL output plugin to convert the +WAL data to JSON. + +The `wal2json` plugin should be available in AWS Aurora databases by default. + +To install the plugin on a self-hosted instance, refer to the plugin's documentation. + ## Usage + +## Testing + +In order to write integration tests for code that uses the `postgres-cdc` library, the test database +must have logical replication enabled and have the `wal2json` plugin installed. + +Refer to the [test Dockerfiles](lib/src/test/resources/postgres/) in this repository that produce configured PostgreSQL images. +