[ClusterLabs] pgsql: is lock needed with synchronous replication?
damienbras77d at yahoo.fr
Wed Sep 12 07:27:00 EDT 2018
I report an issue opened by spritchard on Github that could be interesting:
I gather from the wiki and #699 that stopping the master with a slave running, can leave the old master and the slave (now promoted to master) in inconsistent states - hence why PGSQL.lock isn't removed when the master is stopped in this case [in pgsql_real_stop()].
However, for controlled changeovers (e.g. pcs standby <master_node>, or pcs resource move ... <slave_node>), we don't experience any inconsistencies. i.e. we can just remove lock and carry on.
We are using synchronous replication (rep_mode="sync"). If this is "active" (slave has PGSQL-data-status: STREAMING|SYNC), it this sufficient to prevent inconsistencies?
i.e. if pgsql_real_stop() checked that all slaves are STREAMING|SYNC, could it then safely remove the lock file?
Or are there other things that can go wrong, even with synchronous replication?
(I note that #805 also discusses the lock file)
British Trust for Ornithology
What do you thing about that ?Damien
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users