I setup pacemaker postgresql synchronization.
And for testing I reboot the master(server1). so now one of my client(server2) become master.
pcs status
Cluster name: vipcluster
Stack: corosync
Current DC: server1 (version 1.1.16-94ff4df) - partition with quorum
Last updated: Tue Jan 5 13:28:46 2021
Last change: Tue Jan 5 11:53:03 2021 by root via cibadmin on server1
3 nodes configured
8 resources configured
Online: [ server1 server2 server3 ]
Full list of resources:
MasterVip (ocf::heartbeat:IPaddr2): Started server2
Apache (ocf::heartbeat:apache): Started server2
Master/Slave Set: TestDataClone [Test]
Masters: [ server1 ]
Slaves: [ server2 ]
TestFS (ocf::heartbeat:Filesystem): Started server1
Master/Slave Set: pgsql-ha [pgsqld]
Masters: [ server2 ]
Slaves: [ server1 server3 ]
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
Now I need to maker server1 to be master. How can I do that? I thought it will do automatically
And I notice on postgresql status some changes , missing one server.
su - postgres
postgres@oreo:~$ psql -c "select application_name, state, sync_priority, sync_state from pg_stat_replication;"
application_name | state | sync_priority | sync_state
------------------+-----------+---------------+------------
server3 | streaming | 0 | async
(1 row)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…