Skip to content

copying/syncing of pg_hba.conf file between servers #986

Closed Answered by DimCitus
jerrykan asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jerrykan,

When doing secondary provisioning and then later failover/switchover pg_auto_failover relies on Postgres core tooling, namely pg_basebackup and pg_rewind. Postgres core tools typically sync the whole content of the PGDATA directory, so that includes pg_hba.conf. The usual way to deal with that situation with Postgres is to use the same HBA rules on the primary and standby nodes. After all, as you're mentioning, the standby/secondary nodes are deployed for only one reason: take over the primary role when needed. For them to be ready, best scenario is that the HBA is kept in sync with the primary.

Hope this clarifies the situation. Closing the discussion, please consider askin…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jerrykan
Comment options

Answer selected by DimCitus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants