diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c index b5240dcede..05a2055a33 100644 --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c @@ -477,6 +477,9 @@ ApplyLauncherRegister(void) if (max_logical_replication_workers == 0) return; + if (wal_level < WAL_LEVEL_LOGICAL) + return; + bgw.bgw_flags = BGWORKER_SHMEM_ACCESS | BGWORKER_BACKEND_DATABASE_CONNECTION; bgw.bgw_start_time = BgWorkerStart_RecoveryFinished; diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 661b0fa9b6..ecf330406a 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -163,7 +163,7 @@ #max_worker_processes = 8 # (change requires restart) #max_parallel_workers_per_gather = 2 # taken from max_worker_processes #max_parallel_workers = 8 # total maximum number of worker_processes -#max_logical_replication_workers = 4 # taken from max_worker_processes +#max_logical_replication_workers = 0 # taken from max_worker_processes #old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate # (change requires restart) #backend_flush_after = 0 # measured in pages, 0 disables