hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.12k stars 115 forks source link

How do I modify default settings from postgresql-auto-failover.conf ? #776

Closed nenominal closed 3 years ago

nenominal commented 3 years ago

Hi,

Brand new to pg_auto_failover, nice project, keep up the good work, I really like it.

I have one question, though. After setting up a node, pg_autoctl creates a file PGDATA/postgresql-auto-failover.conf. I'd like to modify some of those settings, but after every restart my modifications are overwritten by some default settings I guess. Could some of you point me to the right directions so I can manage to keep those settings permanent ?

Thanks.

DimCitus commented 3 years ago

Hi @nenominal ; thanks for the kind words, I appreciate it!

About the setup, please edit your postgresql.conf file and leave the pg_auto_failover specific file alone, as this one is expected to be owned by pg_auto_failover. If you have a look at postgresql.conf you will see that we include postgresql-auto-failover.conf early, so that any edits you make in the main file are going to override whatever pg_auto_failover has setup. That's by design.