PostgreSQL-数据复制已停止

时间:2019-02-07 16:31:46

标签: postgresql database-replication

数据复制已从我的三个节点之一停止。错误节点上的复制插槽已消失。是否有人知道发生了什么或如何解决?

详细信息: 节点SS1,SS2和SS3具有SSK订阅的发布。现在从SS2复制失败。使用PostgreSQL 10.1。

SSK psql日志:

2019-02-07 10:21:13.953 CST [26274] LOG:  logical replication apply worker for subscription "SS2" has started
2019-02-07 10:21:14.309 CST [26274] ERROR:  could not start WAL streaming: ERROR:  replication slot "SS2" does not exist
2019-02-07 10:21:14.311 CST [1641] LOG:  worker process: logical replication worker for subscription 17237 (PID 26274) exited with exit code 1

SS2复制插槽表:

 slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn
-----------+--------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------
(0 rows)

为进行比较,SS1复制插槽表:

 slot_name |  plugin  | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn
-----------+----------+-----------+--------+----------+-----------+--------+------------+------+--------------+-------------+---------------------
 SS1 | pgoutput | logical   |  33280 | DBAdd | f         | t      |       2113 |      |     56655301 | 3/114FB460  | 3/114FB498
(1 row)

1 个答案:

答案 0 :(得分:0)

复制插槽不会消失。

某人或某物必须将其删除。

也许主服务器的PostgreSQL数据库日志中包含有价值的信息。

您最近升级了备用计算机吗?由于复制插槽无法复制,因此会使它们消失。