Enable hot_standby when using ReplicationSlot WAL limit policy (v17–v18) - #66
Merged
Merged
Conversation
When WAL_LIMIT_POLICY is set to ReplicationSlot, PostgreSQL requires hot_standby to be enabled on standbys to prevent startup failures with existing logical replication slots. This fixes the error: "logical replication slot exists on the standby, but hot_standby = off" Updated both fresh initialization (run.sh) and warm standby recovery (warm_stanby.sh) scripts to respect WAL_LIMIT_POLICY in addition to the STANDBY variable when configuring hot_standby. Fixes #66 Signed-off-by: souravbiswassanto <sourav.cse4.bu@gmail.com>
souravbiswassanto
force-pushed
the
fix/hot-standby-replication-slot
branch
from
July 28, 2026 10:26
c3010a7 to
95555ba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WAL_LIMIT_POLICY=ReplicationSlotdue to existing logical replication slots requiringhot_standby = onrun.sh) and warm standby recovery (warm_stanby.sh) for versions 17 and 18hot_standbyis now enabled when eitherWAL_LIMIT_POLICY == "ReplicationSlot"orSTANDBY == "hot"Root cause
PostgreSQL refuses to start a standby with
hot_standby = offif logical replication slots exist. The error was:Testing
WAL_LIMIT_POLICY=ReplicationSlotis setSTANDBY=hot