You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original use case: configuration was changed on the primary, not copied on the replica. After the restart, the replica does not even start (different max_connections). Or the replica behaves differently than the old primary after a failover.
''settings'' or ''configuration'' services raise alerts when the conf changes or there is something pending, but this is not enough.
Need: a check that raises an alert when the configuration is or will be different on 2 (or more!) servers. These are not always primary/replicas (eg. sharding). Critical could be raised for incoherences preventing a restart (eg. max_connections).
Exclusion/exclusion of parameters would allow some flexibility. Some parameters could be excluded by default (eg. cluster_name, perhaps log_* ?)
Option 1) Compare ''pg_settings'' values. This works only after a ''pg_reload_conf()'', so some configuration can be forgotten . This does not work on a replica which is already down.
Option 2) Get the parameters from postgresql.conf/auto.conf. This is painful due to included files. ''postgres -C'' is very nice for this but need to be provided with the parameter name; AFAIK you cannot get the whole configuration this way. And this needs a filesystem access, some rights, and to define binary & PGDATA paths.
Perhaps is there place for 2 services? compare_active_conf and compare_restart_conf ?
The text was updated successfully, but these errors were encountered:
Krysztophe
changed the title
Detect configuration difference between 2 servers
Detect PG configuration difference between 2 servers
Feb 19, 2021
Original use case: configuration was changed on the primary, not copied on the replica. After the restart, the replica does not even start (different max_connections). Or the replica behaves differently than the old primary after a failover.
''settings'' or ''configuration'' services raise alerts when the conf changes or there is something pending, but this is not enough.
Need: a check that raises an alert when the configuration is or will be different on 2 (or more!) servers. These are not always primary/replicas (eg. sharding). Critical could be raised for incoherences preventing a restart (eg. max_connections).
Exclusion/exclusion of parameters would allow some flexibility. Some parameters could be excluded by default (eg. cluster_name, perhaps log_* ?)
Option 1) Compare ''pg_settings'' values. This works only after a ''pg_reload_conf()'', so some configuration can be forgotten . This does not work on a replica which is already down.
Option 2) Get the parameters from postgresql.conf/auto.conf. This is painful due to included files. ''postgres -C'' is very nice for this but need to be provided with the parameter name; AFAIK you cannot get the whole configuration this way. And this needs a filesystem access, some rights, and to define binary & PGDATA paths.
Perhaps is there place for 2 services? compare_active_conf and compare_restart_conf ?
The text was updated successfully, but these errors were encountered: