<div dir="ltr">Hello!<br><br>I have configured Postgresql+Pacemaker+Corosync with 3 nodes, 2 of them  for Postgresql HA cluster and one as a witness.<br><br>3 nodes configured<br>4 resource instances configured<br><br>Online: [ witness wizard1 wizard2 ]<br><br>Full list of resources:<br><br>ClusterIP (ocf::heartbeat:IPaddr2): Started wizard1<br>Master/Slave Set: mspgsql [pgsql]<br>Masters: [ wizard1 ]<br>Slaves: [ wizard2 ]<br>ExternalIP (ocf::heartbeat:IPaddr2): Started wizard1<br><br>Daemon Status:<br>corosync: active/enabled<br>pacemaker: active/enabled<br>pcsd: active/enabled<br><br>aptitude versions pacemaker corosync postgresql<br>Package corosync:                              <br>i A 2.4.2-3+deb9u1                                                                                      stable                                                                          900<br><br>Package pacemaker:<br>i   1.1.24-0+deb9u1                                                                                     stable                                                                          900<br><br>Package postgresql:<br>i A 9.6+200astra8                                                                                       stable                                                                          900<br><br>After rebooting the slave, it joins to the cluster in this state:<br> <br>Node Attributes:<br>* Node witness:<br>* Node wizard1:<br>+ master-pgsql : 1000<br>+ pgsql-data-status : LATEST<br>+ pgsql-master-baseline : 00000000070028D8<br>+ pgsql-status : PRI<br>* Node wizard2:<br>+ master-pgsql : -INFINITY<br>+ pgsql-data-status : STREAMING|ASYNC<br>+ pgsql-status : HS:async<br><br>although at the same time<br><br>postgres=# SELECT pid,usename,application_name,state,sync_state FROM pg_stat_replication;<br>pid | usename | application_name | state | sync_state<br>------+----------+------------------+-----------+------------<br>6569 | postgres | wizard2 | streaming | sync<br><br>If I run the command "sudo pcs resource cleanup" on the slave, the cluster goes into the state<br><br>Node Attributes:<br>* Node witness:<br>* Node wizard1:<br>+ master-pgsql : 1000<br>+ pgsql-data-status : LATEST<br>+ pgsql-master-baseline : 00000000070028D8<br>+ pgsql-status : PRI<br>* Node wizard2:<br>+ master-pgsql : 100<br>+ pgsql-data-status : STREAMING|SYNC<br>+ pgsql-status : HS:sync<br><br>Sometimes, after running "pcs resource cleanup", the value of master-pgsql remains -INFINITY, in this case, after running "pcs resource cleanup" again, master-pgsql takes the value 100.<br><br>What could be the cause for this behavior and how serious is it in terms of data security? Postgresql claims that synchronous replication is running. May I ignore this behavior?<br><br>And the second issue: when the slave is rebooted, an entry appears in the Postgresql log<br>postgres@template1 FATAL: the database system is starting up<br>What does this mean?<br><br>Best regards,<br>Sergey Cherukhin<div class="gmail-yj6qo"></div><div class="gmail-adL"><br></div></div>