Skip to content

Commit 12da457

Browse files
committed
Disallow server start with sync_replication_slots = on and wal_level < logical.
Replication slot synchronization (sync_replication_slots = on) requires wal_level to be logical. This commit prevents the server from starting if sync_replication_slots is enabled but wal_level is set to minimal or replica. Failing early during startup helps users catch invalid configurations immediately, which is important because changing wal_level requires a server restart. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Shveta Malik <shveta.malik@gmail.com> Discussion: https://postgr.es/m/CAH0PTU_pc3oHi__XESF9ZigCyzai1Mo3LsOdFyQA4aUDkm01RA@mail.gmail.com
1 parent 53eff47 commit 12da457

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/postmaster/postmaster.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,9 @@ PostmasterMain(int argc, char *argv[])
854854
if (summarize_wal && wal_level == WAL_LEVEL_MINIMAL)
855855
ereport(ERROR,
856856
(errmsg("WAL cannot be summarized when \"wal_level\" is \"minimal\"")));
857+
if (sync_replication_slots && wal_level < WAL_LEVEL_LOGICAL)
858+
ereport(ERROR,
859+
(errmsg("replication slot synchronization (\"sync_replication_slots\" = on) requires \"wal_level\" >= \"logical\"")));
857860

858861
/*
859862
* Other one-time internal sanity checks can go here, if they are fast.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy