{"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"}],"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"],"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":"english-manuals:1e65a5d0f4c5d1671b301e16040d2eced55f5449e9a8d6765bce891df231ec1e","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"recovery_target_inclusive","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"recovery_target_inclusive","SourceRevision":"english-manuals:1e65a5d0f4c5d1671b301e16040d2eced55f5449e9a8d6765bce891df231ec1e","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.","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","unit":null,"vartype":"bool"},"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":"pgweb","Version":"18","Locale":"zh-Hans","Title":"recovery_target_inclusive","Summary":"","BodyHTML":"\u003cp\u003e指定我们是否仅在指定的恢复目标之后停止（\u003ccode\u003eon\u003c/code\u003e），或者仅在恢复目标之前停止（\u003ccode\u003eoff\u003c/code\u003e）。适用于\u003ca href=\"/docs/18/runtime-config-wal.html#GUC-RECOVERY-TARGET-LSN\" rel=\"nofollow\"\u003erecovery_target_lsn\u003c/a\u003e、\u003ca href=\"/docs/18/runtime-config-wal.html#GUC-RECOVERY-TARGET-TIME\" rel=\"nofollow\"\u003erecovery_target_time\u003c/a\u003e或者\u003ca href=\"/docs/18/runtime-config-wal.html#GUC-RECOVERY-TARGET-XID\" rel=\"nofollow\"\u003erecovery_target_xid\u003c/a\u003e被指定的情况。这个设置控制恢复是否包含 WAL 位置（LSN）、提交时间或事务 ID 分别恰好等于目标值的事务。默认值为\u003ccode\u003eon\u003c/code\u003e。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"21290eab2698b7a78efdd05ea27a5e1fbca31cab8f0787707866b209b91e88ed","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e指定我们是否仅在指定的恢复目标之后停止（\u003ccode class=\"literal\"\u003eon\u003c/code\u003e），或者仅在恢复目标之前停止（\u003ccode class=\"literal\"\u003eoff\u003c/code\u003e）。适用于\u003ca href=\"/docs/18/runtime-config-wal.html#GUC-RECOVERY-TARGET-LSN\"\u003erecovery_target_lsn\u003c/a\u003e、\u003ca href=\"/docs/18/runtime-config-wal.html#GUC-RECOVERY-TARGET-TIME\"\u003erecovery_target_time\u003c/a\u003e或者\u003ca href=\"/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。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
