0

我在 AWS rd 上的 2 个 PostgreSQL 服务器(x86_64-pc-linux-gnu 上的 PostgreSQL 10.6,由 gcc (GCC) 4.8.3 20140911(Red Hat 4.8.3-9),64 位编译)之间建立了逻辑复制

在向主服务器添加一些数据后,副本端数据无法更新,复制延迟增长到几 Gb 大小。

试图将 wal_sender_timeout 的值增加到 300000

检查复制槽滞后的脚本

SELECT pg_replication_slots.slot_name,
    pg_wal_lsn_diff(pg_current_wal_lsn(), pg_replication_slots.restart_lsn) AS replicationslotlag,
    pg_replication_slots.active,
    pg_replication_slots.database,
    pg_replication_slots.active_pid
   FROM pg_replication_slots

删除并重新创建订阅有所帮助,但正在寻找成本更低的解决方案

4

0 回答 0