↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / 配置参数

wal_retrieve_retry_interval

指定当从任何来源(物理流复制、本地 pg_wal 或者 WAL 归档)都得不到 WAL 数据时,备库应该等待多久才去重新尝试获取 WAL 数据。如果指定值时没有单位,则以毫秒为单位。默认值是 5 秒。这个参数只能在 postgresql.conf 文件或者服务器命令行中设置。 这个参数在恢复节点需要控制等待新 WAL 数据可用时长的配置中很有用。例如,在归档恢复中,降低该参数的值可以让系统在检测到新 WAL 文件时更快作出响应;在 WAL 活动较低的系统上,增大该值则可以减少访问 WAL 归档所需的请求次数,这在对基础设施访问次数进行计量的云环境中尤其有用。 在逻辑复制中,该参数还限制失败的复制应用工作进程或表/序列同步工作进程被重新启动的频率。

英文手册覆盖始于 PostgreSQL 7.4. 来源历史与运行验证各自保留独立版本边界。

当前阅读 PG 19·选择有来源记录的版本

boot val
5000
category
Replication / Standby Servers
context
sighup
doc same as
未知
documented
true
enumvals
未知
extra desc
未知
lang
en
max val
2147483647
metadata version
19beta4
min val
1
name
wal_retrieve_retry_interval
short desc
Sets the time to wait before retrying to retrieve WAL after a failed attempt.
source
pg-settings-source-snapshot
unit
ms
vartype
integer

版本定义 PG 19

指定当从任何来源(物理流复制、本地 pg_wal 或者 WAL 归档)都得不到 WAL 数据时,备库应该等待多久才去重新尝试获取 WAL 数据。如果指定值时没有单位,则以毫秒为单位。默认值是 5 秒。这个参数只能在 postgresql.conf 文件或者服务器命令行中设置。

这个参数在恢复节点需要控制等待新 WAL 数据可用时长的配置中很有用。例如,在归档恢复中,降低该参数的值可以让系统在检测到新 WAL 文件时更快作出响应;在 WAL 活动较低的系统上,增大该值则可以减少访问 WAL 归档所需的请求次数,这在对基础设施访问次数进行计量的云环境中尤其有用。

在逻辑复制中,该参数还限制失败的复制应用工作进程或表/序列同步工作进程被重新启动的频率。

比较版本

完整来源事实

doc html

<p>
        Specifies how long the standby server should wait when WAL data is not
        available from any sources (streaming physical replication,
        local <code class="filename">pg_wal</code> or WAL archive) before trying
        again to retrieve WAL data.
        If this value is specified without units, it is taken as milliseconds.
        The default value is 5 seconds.
        This parameter can only be set in
        the <code class="filename">postgresql.conf</code> file or on the server
        command line.
       </p><p>
        This parameter is useful in configurations where a node in recovery
        needs to control the amount of time to wait for new WAL data to be
        available. For example, in archive recovery, it is possible to
        make the recovery more responsive in the detection of a new WAL
        file by reducing the value of this parameter. On a system with
        low WAL activity, increasing it reduces the amount of requests necessary
        to access WAL archives, something useful for example in cloud
        environments where the number of times an infrastructure is accessed
        is taken into account.
       </p><p>
        In logical replication, this parameter also limits how often a failing
        replication apply worker or table/sequence synchronization worker will
        be respawned.
       </p>

documentation revision

{"inputs":[{"file":"runtime-config-replication.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"76b3c1615af7dd60d031cefd485568e6336b3d13c366e8a473304bd7ef2fb92d","version":"19rc2"},{"file":"runtime-config-replication.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"935f29b71e863329c3c39caae902de37d5bbf03c2adcf42322225d3cefe71a84","version":"19rc2"}],"release":"19rc2","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 19 · wiki-repair-20261023:67e13465948801e2abadd87f2402ec61e1704809a48ed1ce0cc00318578846ae

正文语言: zh-Hans · wiki-repair-20261023:67e13465948801e2abadd87f2402ec61e1704809a48ed1ce0cc00318578846ae