如何解决如何监控 Postgres 复制?
我有 clasters 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();
为空 In to 9.6.20 for master node
pg_last_xlog_receive_location - 为空
pg_last_xact_replay_timestamp - 有时间开始复制
pg_last_xlog_replay_location - 有价值,但 != SELECT sent_location FROM pg_stat_replication s;
集群复制有效。
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.html
pg_last_xlog_receive_location()
和 pg_last_xlog_replay_location()
需要在副本中监控。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。