[英]pgpool/postgres - replication_delay is too high, how to reset?
in our setup the show pool_nodes shows a very high replication_delay and it keeps increasing, becuase of which any new queries are not replicated in the slave在我们的设置中,show pool_nodes 显示了非常高的 replication_delay 并且它不断增加,因为任何新查询都不会在从属服务器中复制
following is the output of show pool_nodes command, is there a way to reset this, data loss if fine as this is not a live/production system.以下是show pool_nodes命令的 output,有没有办法重置它,如果没问题,数据丢失,因为这不是实时/生产系统。
[root@DB2 ~]# psql -h DB-HA-Hostname -U postgres -p 5432 -c 'show pool_nodes'
node_id | hostname | port | status | lb_weight | role | select_cnt | load_balance_node | replication_delay | last_status_change
---------+--------------------------------------+------+--------+-----------+---------+------------+-------------------+-------------------+---------------------
0 | DB1-hostname | 5432 | up | 0.500000 | primary | 0 | true | 0 | 2021-01-11 19:32:00
1 | DB2-hostname | 5432 | up | 0.500000 | standby | 0 | false | 54986528 | 2021-01-11 19:32:00
(2 rows)
I have tried, restarting nodes, restarting pgpool, restarting postgresql, deleting database etc.. but no luck.我已经尝试过,重启节点,重启 pgpool,重启 postgresql,删除数据库等。但没有运气。 As soon as the slave gets attached the replication_delay is high again..
一旦从属设备连接,replication_delay 就会再次变高..
Check the replication is running or not if it's not running re-configure the standby then attached the nodes检查复制是否正在运行,如果它没有运行重新配置备用然后附加节点
select * from pg_stat_replication; select * 来自 pg_stat_replication;
after taking basebackup start the postgresql server then pcp-attach-node on pgpool采取 basebackup 后,启动 postgresql 服务器,然后在 pgpool 上启动 pcp-attach-node
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.