From 0723a509dcb0bd26e2d24855366f966f896fb3b1 Mon Sep 17 00:00:00 2001 From: Hermann Mayer Date: Thu, 14 Nov 2024 12:36:45 +0100 Subject: [PATCH] Enabled logical replication by default. Signed-off-by: Hermann Mayer --- 16.4/config/postgres.sh | 4 +++- 17.0/config/postgres.sh | 4 +++- config/postgres.sh | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/16.4/config/postgres.sh b/16.4/config/postgres.sh index 7b5ec6d..8e45339 100755 --- a/16.4/config/postgres.sh +++ b/16.4/config/postgres.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -export POSTGRES_ARGS=${POSTGRES_ARGS:-''} +# Enable logical replication by default. This allows tools like Debezium +# directly to add an replication slot to stream events. +export POSTGRES_ARGS=${POSTGRES_ARGS:-'-c wal_level=logical'} exec /usr/local/bin/docker-entrypoint.sh postgres ${POSTGRES_ARGS} diff --git a/17.0/config/postgres.sh b/17.0/config/postgres.sh index 7b5ec6d..8e45339 100755 --- a/17.0/config/postgres.sh +++ b/17.0/config/postgres.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -export POSTGRES_ARGS=${POSTGRES_ARGS:-''} +# Enable logical replication by default. This allows tools like Debezium +# directly to add an replication slot to stream events. +export POSTGRES_ARGS=${POSTGRES_ARGS:-'-c wal_level=logical'} exec /usr/local/bin/docker-entrypoint.sh postgres ${POSTGRES_ARGS} diff --git a/config/postgres.sh b/config/postgres.sh index 7b5ec6d..8e45339 100755 --- a/config/postgres.sh +++ b/config/postgres.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -export POSTGRES_ARGS=${POSTGRES_ARGS:-''} +# Enable logical replication by default. This allows tools like Debezium +# directly to add an replication slot to stream events. +export POSTGRES_ARGS=${POSTGRES_ARGS:-'-c wal_level=logical'} exec /usr/local/bin/docker-entrypoint.sh postgres ${POSTGRES_ARGS}