Skip to content

Let Patroni control pg_hba via its native feature

Summary

When bootstraping a greenfield Patroni cluster, we don't have pg_hba.conf populated in advance for us. This is due to the postgresql configuration files not being generated, as we are using a different bootstrap method.

Proposal

Allow Patroni to control pg_hba.conf by feeding the same information we would print in a pg_hba.conf template, to the corresponding configuration key postgresql: pg_hba: []

With this fed to Patroni, it can manipulate and keep pg_hba.conf always up to date.

References

https://patroni.readthedocs.io/en/latest/SETTINGS.html?highlight=pg_hba#postgresql