【问题标题】:Why repmgr showing WAL replay is paused on all standby node?Why repmgr showing WAL replay is paused on all standby node?
【发布时间】:2022-12-02 05:28:46
【问题描述】:

At repmgr cluster show command showing below error. Why it show WAL replay is paused on node2 & node3 as a warning. Here node2 and node3 is my standby node. Here I attached postgresql.auto.conf for node1 and node2. After PITR using Barman I found this issue. Why this is happen and how to solve it?

【问题讨论】:

标签: postgresql database-administration postgresql-12 repmgr barman


【解决方案1】:

Since v12, the default recovery_target_action has been "pause". This lets you explore the system in read-only mode to make sure you are at the optimal point in time, before you fully open the database.

Since you didn't override that (by using barman's --target-action, for example), then "pause" is what you get.

You could fix this (without redoing the whole restore) by editing your conf files to add a recovery_target_action, or by just connecting to each one and invoking pg_wal_replay_resume().

【讨论】:

    【解决方案2】:

    I struggled with the same issue for almost 3-4 days and finally found that postgresql.auto.conf is an issue on standby. Please remove or comment lines in postgresql.auto.conf #restore_command = 'cp barman_wal/%f %p' #recovery_end_command = 'rm -fr barman_wal' #recovery_target_time = '2022-11-06 10:00:00'

    I restarted my standby after cloning using repmgr and everything started to work. Hope this helps

    【讨论】:

      【解决方案3】:

      PostgreSQL is unnable to replicate transaction that apply to the DDL part of SQL and when such a command is executed on the source database of the replication the streaming replication immediately stops.

      Investigate that way to find which DDL command (CREATE, ALTER, DROP...) has benn executed on the source database...

      【讨论】:

      • This is plain wrong. Streaming replication will most certainly replicate DDL statements. You are confusing this withlogicalreplication which indeed has this limitation.
      猜你喜欢
      • 2022-12-02
      • 2022-12-01
      • 2022-12-01
      • 2022-11-20
      • 2022-12-01
      • 2022-11-20
      • 2022-11-20
      • 2022-12-02
      • 2022-11-09
      相关资源
      最近更新 更多