max_standby_archive_delay
当热备处于活动状态时,此参数确定备库在取消与即将应用的 WAL 条目冲突的备库查询之前应等待多长时间,如第 26.4.2 节中所述。max_standby_archive_delay 在从 WAL 归档中读取 WAL 数据时适用(因此不是当前的)。如果未指定单位,则将其视为毫秒。默认值为 30 秒。值为-1 允许备库永远等待冲突查询完成。此参数只能在 postgresql.conf 文件或服务器命令行中设置。 注意,max_standby_archive_delay 并不等同于查询在被取消前可以运行的最长时间;它表示应用任意一个 WAL 段的数据所允许的最长总时间。因此,如果某个查询先前在处理该 WAL 段时已造成显著延迟,后续冲突查询的宽限时间就会短得多。
英文手册覆盖始于 PostgreSQL 7.4. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 19·选择有来源记录的版本
- boot val
- 30000
- category
- Replication / Standby Servers
- context
- sighup
- doc same as
- 未知
- documented
- true
- enumvals
- 未知
- extra desc
- -1 means wait forever.
- lang
- en
- max val
- 2147483647
- metadata version
- 19beta4
- min val
- -1
- name
- max_standby_archive_delay
- short desc
- Sets the maximum delay before canceling queries when a hot standby server is processing archived WAL data.
- source
- pg-settings-source-snapshot
- unit
- ms
- vartype
- integer
版本定义 PG 19
当热备处于活动状态时,此参数确定备库在取消与即将应用的 WAL 条目冲突的备库查询之前应等待多长时间,如第 26.4.2 节中所述。max_standby_archive_delay 在从 WAL 归档中读取 WAL 数据时适用(因此不是当前的)。如果未指定单位,则将其视为毫秒。默认值为 30 秒。值为-1 允许备库永远等待冲突查询完成。此参数只能在 postgresql.conf 文件或服务器命令行中设置。
注意,max_standby_archive_delay 并不等同于查询在被取消前可以运行的最长时间;它表示应用任意一个 WAL 段的数据所允许的最长总时间。因此,如果某个查询先前在处理该 WAL 段时已造成显著延迟,后续冲突查询的宽限时间就会短得多。
比较版本
完整来源事实
doc html
<p>
When hot standby is active, this parameter determines how long the
standby server should wait before canceling standby queries that
conflict with about-to-be-applied WAL entries, as described in
<a class="xref" href="/docs/19/hot-standby.html#HOT-STANDBY-CONFLICT" title="26.4.2. Handling Query Conflicts">Section 26.4.2</a>.
<code class="varname">max_standby_archive_delay</code> applies when WAL data is
being read from WAL archive (and is therefore not current).
If this value is specified without units, it is taken as milliseconds.
The default is 30 seconds.
A value of -1 allows the standby to wait forever for conflicting
queries to complete.
This parameter can only be set in the <code class="filename">postgresql.conf</code>
file or on the server command line.
</p><p>
Note that <code class="varname">max_standby_archive_delay</code> is not the same as the
maximum length of time a query can run before cancellation; rather it
is the maximum total time allowed to apply any one WAL segment's data.
Thus, if one query has resulted in significant delay earlier in the
WAL segment, subsequent conflicting queries will have much less grace
time.
</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"}来源引用
定义来源
center · PostgreSQL 19 · wiki-repair-20261023:614fb0942dd91fa7a15c36a9b589b71b0fb62bc79593e14bbfdbc9327efa9ac8
正文语言: zh-Hans · wiki-repair-20261023:614fb0942dd91fa7a15c36a9b589b71b0fb62bc79593e14bbfdbc9327efa9ac8