如何监控Postgres复制?



我有集群postgres 9.6.15和9.6.20(流复制)
在9.6.15主节点

pg_last_xact_replay_timestamp();   
pg_last_xlog_receive_location();
pg_last_xlog_replay_location();

是空的在9.6.20主节点

pg_last_xlog_receive_location - is empty

pg_last_xact_replay_timestamp -有时间启动复制

pg_last_xlog_replay_location -有值,但是!= SELECTsend_location FROM pg_stat_replication s;

Cluster replication is work.

SELECT client_addr,pg_xlog_location_diff(s.sent_location,s.replay_location) byte_lag FROM pg_stat_replication s;
have byte_lag = 0

为什么
pg_last_xact_replay_timestamp();
pg_last_xlog_receive_location();
pg_last_xlog_replay_location(); 

在工作副本中为空?如何监控Posrgres集群复制?

http://eulerto.blogspot.com/2011/11/understanding-wal-nomenclature.htmlpg_last_xlog_receive_location()pg_last_xlog_replay_location()在副本中需要监视器

最新更新