[ClusterLabs] pgsql: is lock needed with synchronous replication?

Bras Damien 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)

Steve Pritchard

British Trust for Ornithology



What do you thing about that ?Damien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20180912/33b0777f/attachment-0002.html>


More information about the Users mailing list