Include pgtune.conf in remote replica postgresql.conf - #69
Merged
Conversation
The tuning include (include_if_exists for pgtune.conf, gated on
TUNING_ENABLED) was already emitted by primary/start.sh and
standby/run.sh, but remote-replica.sh builds its own
/tmp/postgresql.conf and never included it. As a result remote
replica pods ignored the tuned configuration entirely.
Add the same block right after the config file is created in
role_scripts/{13..18}/standby/remote-replica.sh, matching the
placement used by the primary and standby scripts so explicit
settings written later still take precedence.
Signed-off-by: souravbiswassanto <sourav.cse4.bu@gmail.com>
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.
Problem
The tuning include:
is emitted by
primary/start.shandstandby/run.sh, but not bystandby/remote-replica.sh. Remote replica pods (REMOTE_REPLICA=true, dispatched through/run_scripts/role/remote-replica.sh) build their own/tmp/postgresql.conffrom scratch, so the tuned configuration was silently ignored for that mode.Change
Add the same block immediately after
touch /tmp/postgresql.confinrole_scripts/{13,14,15,16,17,18}/standby/remote-replica.sh.Placement matches the primary/standby scripts: the include comes first so the explicit settings written afterwards (replication, TDE, SSL,
primary_conninfo, …) still take precedence over anything inpgtune.conf.Versions 9–12 have no
remote-replica.sh, so they are unaffected.