<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><span><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;">I report an issue opened by spritchard <font size="2">on Github that could be interesting:</font></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><font size="2"><br></font></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;"><p style="margin-bottom: 16px; margin-top: 0px !important;"><font size="2">I gather from the <a href="http://wiki.clusterlabs.org/wiki/PgSQL_Replicated_Cluster" class="ydpc9e4ce89yiv3795226283" style="color: rgb(25, 106, 212); text-decoration-line: underline; background-color: transparent;" rel="nofollow" target="_blank">wiki</a> and <a class="ydpc9e4ce89yiv3795226283ydp16e5cc73issue-link ydpc9e4ce89yiv3795226283ydp16e5cc73js-issue-link ydpc9e4ce89yiv3795226283ydp16e5cc73tooltipped ydpc9e4ce89yiv3795226283ydp16e5cc73tooltipped-ne" href="https://github.com/ClusterLabs/resource-agents/issues/699" style="color: rgb(25, 106, 212); text-decoration-line: underline; background-color: transparent; position: relative;" rel="nofollow" target="_blank">#699</a> 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()].</font></p><p style="margin-top: 0px; margin-bottom: 16px;"><font size="2">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.</font></p><p style="margin-top: 0px; margin-bottom: 16px;"><font size="2">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?</font></p><p style="margin-top: 0px; margin-bottom: 16px;"><font size="2">i.e. if pgsql_real_stop() checked that all slaves are STREAMING|SYNC, could it then <span style="font-weight: 600;">safely</span> remove the lock file?</font></p><p style="margin-top: 0px; margin-bottom: 16px;"><font size="2">Or are there other things that can go wrong, even with synchronous replication?</font></p><p style="margin-top: 0px; margin-bottom: 16px;"><font size="2">(I note that <a class="ydpc9e4ce89yiv3795226283ydp16e5cc73issue-link ydpc9e4ce89yiv3795226283ydp16e5cc73js-issue-link ydpc9e4ce89yiv3795226283ydp16e5cc73tooltipped ydpc9e4ce89yiv3795226283ydp16e5cc73tooltipped-ne" href="https://github.com/ClusterLabs/resource-agents/issues/805" style="color: rgb(25, 106, 212); text-decoration-line: underline; background-color: transparent; position: relative;" rel="nofollow" target="_blank">#805</a> also discusses the lock file)</font></p><p style="margin-top: 0px; margin-bottom: 0px !important;"><font size="2">Steve Pritchard<br></font></p><div><font size="2">British Trust for Ornithology</font></div><p></p></blockquote><font size="2"><div><font size="2"><br></font></div>What do you thing about that ?</font></div><div style="font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;"><font size="2">Damien</font></div></span></div></div></body></html>