pg_wal_replay_resume()

用于恢复 WAL 文件重放的函数
此条目与较新PostgreSQL版本中已重命名的功能相关

pg_wal_replay_resume() 是一个系统函数,用于在先前调用 pg_wal_replay_pause() 或导致 WAL 重放暂停的恢复操作之后,恢复 WAL 文件的重放。

pg_wal_replay_resume()PostgreSQL 9.1 中首次添加,当时名为 pg_xlog_replay_resume()

用法

pg_wal_replay_resume() → void

变更历史

示例

pg_wal_replay_resume() 的基本用法

postgres=# SELECT pg_wal_replay_pause();
 pg_wal_replay_pause
---------------------

(1 row)

postgres=# SELECT pg_get_wal_replay_pause_state(); -- PostgreSQL 14 and later
 pg_get_wal_replay_pause_state
-------------------------------
 paused
(1 row)

postgres=# SELECT pg_wal_replay_resume();
 pg_wal_replay_resume
----------------------

(1 row)

这会在 PostgreSQL 日志文件中生成类似以下的条目

[2021-04-06 15:14:24 UTC] psql postgres postgres LOG:  00000: statement: SELECT pg_wal_replay_pause();
[2021-04-06 15:14:24 UTC]    LOG:  00000: recovery has paused
[2021-04-06 15:14:24 UTC]    HINT:  Execute pg_wal_replay_resume() to continue.
[2021-04-06 15:14:34 UTC] psql postgres postgres LOG:  00000: statement: SELECT pg_get_wal_replay_pause_state();
[2021-04-06 15:14:58 UTC] psql postgres postgres LOG:  00000: statement: SELECT pg_wal_replay_resume();

分类

重命名项, 复制, 系统函数, WAL

另请参阅

pg_wal_replay_pause(), pg_get_wal_replay_pause_state()

反馈

提交对“pg_wal_replay_resume()”的任何评论、建议或更正请 在此