{"Entry":{"collection":"guc","key":"recovery_target_inclusive","name":"recovery_target_inclusive","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Write-Ahead Log / Recovery Target","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"11","status":"added","to":"12"}],"content_hash":"9131502dc9b002a1189f4e0e61b57e34ad5ef96763db5bca44454fac854cc967","context":"","default_changed_in":[],"default_history":[{"from":"12","to":"19","value":"on"}],"derived_content_hash":"f12caa24cd7b9c3df280ee6bb2f5b5996780dc5570dd2ed136c68156af3463c9","editorial":{"advice":{"olap":"For a large restore, budget WAL replay and inspection time first. Validate the reached point read-only; do not let heavy analytical queries delay or contaminate the recovery decision.","oltp":"This is not a steady-state performance knob. Set recovery_target_inclusive only on an isolated recovery instance after recording target evidence, base backup, timeline, and expected boundary; rehearse and require a second-person review.","small":"Prefer a backup tool that generates a controlled recovery configuration. Never leave target settings in ordinary primary/standby templates, and clean up signal files and targets afterward."},"mechanism":["Chooses which side of an exact recovery boundary is retained. The value is read when targeted recovery starts.","on stops just after and includes the target LSN, commit time, or XID; off stops just before and excludes it. The setting applies only to recovery_target_lsn, recovery_target_time, and recovery_target_xid.","It has no effect on immediate or named restore-point targets. Select the boundary from identified WAL/business evidence and validate recovered rows and transactions, not only the displayed timestamp or LSN."],"pitfalls":["Expecting it to affect immediate or named restore-point targets.","Selecting on/off without identifying the exact boundary transaction or WAL record.","Assuming equal timestamps imply one deterministic commit boundary.","Validating only the reported replay position instead of recovered application data.","Leaving the value in a reusable recovery template without documenting the intended side of the boundary."],"references":[{"title":"PostgreSQL 19 Beta 4: recovery_target_inclusive","url":"https://www.postgresql.org/docs/19/runtime-config-wal.html#GUC-RECOVERY-TARGET-INCLUSIVE"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["recovery_target_lsn","recovery_target_time","recovery_target_xid","recovery_target_action","recovery_target_timeline","restore_command"],"summary":"recovery_target_inclusive sets whether to include or exclude transaction with recovery target. It is a postmaster setting present in PG12–18; the latest recorded boot default is on."},"enumvals":[],"first_version":"12","group":"Write-Ahead Log","group_slug":"wal","imported_at":"2026-09-27T17:57:31.878331+08:00","intro_commit":{"authored_at":"2018-11-25T16:31:16+01:00","discussion":["https://www.postgresql.org/message-id/flat/607741529606767@web3g.yandex.ru/"],"hash":"2dedf4d9a899b36d1a8ed29be5efbd1b31a8fe85","subject":"Integrate recovery.conf into postgresql.conf","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=2dedf4d9a899b36d1a8ed29be5efbd1b31a8fe85"},"key":"recovery_target_inclusive","last_version":"20","max_val":"","min_val":"","name":"recovery_target_inclusive","position":327,"present_in":["12","13","14","15","16","17","18","19","20"],"repair_provenance":{"original_source_revision":"english-manuals:1e65a5d0f4c5d1671b301e16040d2eced55f5449e9a8d6765bce891df231ec1e","receipt_sha256":"c09907a51a7878f1d37ddbf1e0b08a03f034c8ce8558f524078f13d158a10b32","repair":"wiki-repair-20261023"},"short_desc":"Specifies whether to stop just after the specified recovery target (on), or just before the recovery target (off).","short_desc_zh":"","source_rev":"wiki-repair-20261023:941aace85b49640a6171678545e689d6f786fadb2d93908e53c59b7576a13178","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"recovery_target_inclusive","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"recovery_target_inclusive","SourceRevision":"wiki-repair-20261023:941aace85b49640a6171678545e689d6f786fadb2d93908e53c59b7576a13178","Facts":{"boot_val":"on","category":"Write-Ahead Log / Recovery Target","context":"postmaster","description":"Specifies whether to stop just after the specified recovery target (on), or just before the recovery target (off). Applies when recovery_target_lsn, recovery_target_time, or recovery_target_xid is specified. This setting controls whether transactions having exactly the target WAL location (LSN), commit time, or transaction ID, respectively, will be included in the recovery. Default is on.","description_zh":"指定我们是否仅在指定的恢复目标之后停止（on），或者仅在恢复目标之前停止（off）。适用于 recovery_target_lsn、recovery_target_time 或者 recovery_target_xid 被指定的情况。这个设置控制恢复是否包含 WAL 位置（LSN）、提交时间或事务 ID 分别恰好等于目标值的事务。默认值为 on。","description_zh_html":"\u003cp\u003e\n        指定我们是否仅在指定的恢复目标之后停止（\u003ccode class=\"literal\"\u003eon\u003c/code\u003e），或者仅在恢复目标之前停止（\u003ccode class=\"literal\"\u003eoff\u003c/code\u003e）。适用于 \u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-wal.html#GUC-RECOVERY-TARGET-LSN\"\u003erecovery_target_lsn\u003c/a\u003e、\u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-wal.html#GUC-RECOVERY-TARGET-TIME\"\u003erecovery_target_time\u003c/a\u003e 或者 \u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-wal.html#GUC-RECOVERY-TARGET-XID\"\u003erecovery_target_xid\u003c/a\u003e 被指定的情况。这个设置控制恢复是否包含 WAL 位置（LSN）、提交时间或事务 ID 分别恰好等于目标值的事务。默认值为 \u003ccode class=\"literal\"\u003eon\u003c/code\u003e。\n       \u003c/p\u003e","doc":{"anchor":"GUC-RECOVERY-TARGET-INCLUSIVE","file":"runtime-config-wal.html","lang":"en","sha256":"d2646404a06e8f7ac655204b4f28c049ae8f3fd4f2272db080fcefa2c4af0763","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"recovery_target_inclusive","short_desc":"Sets whether to include or exclude transaction with recovery target.","source":"pg-settings-source-snapshot","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-wal.html","sha256":"94cdacb1171b4c528492ca0aec6aafa48a2c758276225fe0dbfe5b12452d4930"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"bool","zh_from":"same-version-pgdoc"},"ManualEvidence":{"doc":{"anchor":"GUC-RECOVERY-TARGET-INCLUSIVE","file":"runtime-config-wal.html","lang":"en","sha256":"d2646404a06e8f7ac655204b4f28c049ae8f3fd4f2272db080fcefa2c4af0763","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"recovery_target_inclusive","SourceDatabase":"center","Version":"18","Locale":"en","Title":"recovery_target_inclusive","Summary":"Specifies whether to stop just after the specified recovery target (on), or just before the recovery target (off). Applies when recovery_target_lsn, recovery_target_time, or recovery_target_xid is specified. This setting controls whether transactions having exactly the target WAL location (LSN), commit time, or transaction ID, respectively, will be included in the recovery. Default is on.","BodyHTML":"\u003cp\u003eSpecifies whether to stop just after the specified recovery target (on), or just before the recovery target (off). Applies when recovery_target_lsn, recovery_target_time, or recovery_target_xid is specified. This setting controls whether transactions having exactly the target WAL location (LSN), commit time, or transaction ID, respectively, will be included in the recovery. Default is on.\u003c/p\u003e","SourceRevision":"wiki-repair-20261023:941aace85b49640a6171678545e689d6f786fadb2d93908e53c59b7576a13178","ContentHash":"7013d2dbd4754417da363b1c9ec85d9149b3c2fe895985499dd7a0d835096bad","Payload":{"description":"Specifies whether to stop just after the specified recovery target (on), or just before the recovery target (off). Applies when recovery_target_lsn, recovery_target_time, or recovery_target_xid is specified. This setting controls whether transactions having exactly the target WAL location (LSN), commit time, or transaction ID, respectively, will be included in the recovery. Default is on."}},"RequestedLocale":"en","Fallback":false,"Versions":["12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
