PostgreSQL configuration is not updated with reconfigure when Patroni is enabled

PostgreSQL configuration files, including pg_hba.conf, pg_ident.conf, postgresql.base.conf, are not updated after they are changed in subsequent reconfigures.

The problem is that patroni cookbook stores PostgreSQL configuration is another directory and copies them over after bootstrapping the cluster. This is done with a custom_bootstrap script. However, when the configuration changes the postgresql_config resource does not notify Patroni to copy the files again and reload the configuration.

Once changed, these files must be copied to PostgreSQL data directory and PostgreSQL must be notified in a way that it will not trigger automatic failover.

Edited by Hossein Pursultani