在使用pacemaker部署的主备服务器环境中,由于使用到了postgresql,对其复杂的状态变化做了如下整理。
■PRI : running as Primary(Master)
■HS : running as Hot Standby(Slave)
HS:alone : running as Hot Standby,not connected to Primary
HS:async : running as Hot Standby in Asynchronous replication mode
HS:sync : running as Hot Standby in Synchronous replication mode
■STOP : stopped
■DISCONNECT:
Master changes other node state into DISCONNECT if Master can't detect connection of replication because of LAN failure or breakdown of Slave and so on.
■{state}|{sync_state}
Master changes other node state into {state}|{sync_state} if Master detects connection of replication.
{state} and {sync_state} means state of replication which is retrieved using "select state and sync_state from pg_stat_replication" on Master.
For example, INIT, CATCHUP, and STREAMING are displayed in {state} and ASYNC, SYNC are displayed in {sync_state}
■LATEST:
It's displayed when it's Master.
■Master : manage PostgreSQL as Master
■Slave : manage PostgreSQL as Slave
■Stopped : manage PostgreSQL as Stopped