{"Entry":{"collection":"guc","key":"wal_consistency_checking","name":"wal_consistency_checking","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Developer Options","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"9.6","status":"added","to":"10"},{"documentation_changed":true,"fields":{},"from":"14","status":"changed","to":"15"}],"content_hash":"d7b1f4835529795e55b5ac384d34024589bbd9c77683c72feed7595d135a6e0b","context":"","default_changed_in":[],"default_history":[{"from":"10","to":"19","value":"Empty string"}],"editorial":{"advice":{"olap":"Long analytical runs can amplify wal_consistency_checking's debug overhead and artifacts. Prefer standard EXPLAIN and statistics first, and isolate any developer experiment from normal users.","oltp":"Do not tune production OLTP with wal_consistency_checking. Enable it only for a bounded reproduction with an owner, log/disk budget, rollback condition, and evidence-capture plan; restore the default immediately afterward.","small":"Keep wal_consistency_checking at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation."},"mechanism":["wal_consistency_checking names WAL resource managers whose redo routines should be verified. For selected records, PostgreSQL includes full-page images and after replay compares the resulting buffers with those images.","Unexpected differences terminate recovery with a fatal error; known nondeterministic differences such as some hint bits are handled specially. all enables every supported resource manager.","The added full-page images can greatly increase WAL volume and replay work. This finds redo implementation bugs; it is not a general on-disk checksum, backup verification, or corruption repair tool. Its superuser context permits an authorized session change without a server restart."],"pitfalls":["Leaving wal_consistency_checking enabled after the bounded diagnostic or recovery task.","Running the experiment on the only copy of production data.","Underestimating log, core-file, temporary-file, WAL, CPU, or connection-slot amplification.","Treating a server that merely starts or completes a query as proof that data and behavior are correct."],"references":[{"title":"PostgreSQL 19 Beta 4: wal_consistency_checking","url":"https://www.postgresql.org/docs/19/runtime-config-developer.html#GUC-WAL-CONSISTENCY-CHECKING"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["full_page_writes","wal_log_hints","ignore_invalid_pages","ignore_checksum_failure","wal_level"],"summary":"wal_consistency_checking — Sets the WAL resource managers for which WAL consistency checks are done. Observed in PG10–19 Beta 4; its last measured boot default is empty string in PG19 Beta 4, with superuser context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"10","group":"Developer Options","group_slug":"developer","imported_at":"2026-09-27T17:57:32.32365+08:00","intro_commit":{"authored_at":"2017-02-08T15:45:30-05:00","discussion":[],"hash":"a507b86900f695aacc8d52b7d2cfcb65f58862a2","subject":"Add WAL consistency checking facility.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=a507b86900f695aacc8d52b7d2cfcb65f58862a2"},"key":"wal_consistency_checking","last_version":"20","max_val":"","min_val":"","name":"wal_consistency_checking","position":465,"present_in":["10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"This parameter is intended to be used to check for bugs in the WAL redo routines.","short_desc_zh":"","source_rev":"english-manuals:e113b286f226ce6aec06209ec434a62efca8563b95e76281a8a6ef3c9cfcc347","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"wal_consistency_checking","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"wal_consistency_checking","SourceRevision":"english-manuals:e113b286f226ce6aec06209ec434a62efca8563b95e76281a8a6ef3c9cfcc347","Facts":{"boot_val":"","category":"Developer Options","context":"superuser","description":"This parameter is intended to be used to check for bugs in the WAL redo routines. When enabled, full-page images of any buffers modified in conjunction with the WAL record are added to the record. If the record is subsequently replayed, the system will first apply each record and then test whether the buffers modified by the record match the stored images. In certain cases (such as hint bits), minor variations are acceptable, and will be ignored. Any unexpected differences will result in a fatal error, terminating recovery. The default value of this setting is the empty string, which disables the feature. It can be set to all to check all records, or to a comma-separated list of resource managers to check only records originating from those resource managers. Currently, the supported resource managers are heap, heap2, btree, hash, gin, gist, sequence, spgist, brin, and generic. Extensions may define additional resource managers. Only superusers and users with the appropriate SET privilege can change this setting.","doc":{"anchor":"GUC-WAL-CONSISTENCY-CHECKING","file":"runtime-config-developer.html","lang":"en","sha256":"f5e7e39d176c642ac0799c87669ce2f6f60fcd97d109e290860ec74c36d7ecad","slug":"18"},"documented":true,"enumvals":null,"extra_desc":"Full-page images will be logged for all data blocks and cross-checked against the results of WAL replay.","lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"wal_consistency_checking","short_desc":"Sets the WAL resource managers for which WAL consistency checks are done.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-WAL-CONSISTENCY-CHECKING","file":"runtime-config-developer.html","lang":"en","sha256":"f5e7e39d176c642ac0799c87669ce2f6f60fcd97d109e290860ec74c36d7ecad","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"wal_consistency_checking","SourceDatabase":"center","Version":"18","Locale":"en","Title":"wal_consistency_checking","Summary":"This parameter is intended to be used to check for bugs in the WAL redo routines. When enabled, full-page images of any buffers modified in conjunction with the WAL record are added to the record. If the record is subsequently replayed, the system will first apply each record and then test whether the buffers modified by the record match the stored images. In certain cases (such as hint bits), minor variations are acceptable, and will be ignored. Any unexpected differences will result in a fatal error, terminating recovery. The default value of this setting is the empty string, which disables the feature. It can be set to all to check all records, or to a comma-separated list of resource managers to check only records originating from those resource managers. Currently, the supported resource managers are heap, heap2, btree, hash, gin, gist, sequence, spgist, brin, and generic. Extensions may define additional resource managers. Only superusers and users with the appropriate SET privilege can change this setting.","BodyHTML":"\u003cp\u003eThis parameter is intended to be used to check for bugs in the WAL redo routines. When enabled, full-page images of any buffers modified in conjunction with the WAL record are added to the record. If the record is subsequently replayed, the system will first apply each record and then test whether the buffers modified by the record match the stored images. In certain cases (such as hint bits), minor variations are acceptable, and will be ignored. Any unexpected differences will result in a fatal error, terminating recovery. The default value of this setting is the empty string, which disables the feature. It can be set to all to check all records, or to a comma-separated list of resource managers to check only records originating from those resource managers. Currently, the supported resource managers are heap, heap2, btree, hash, gin, gist, sequence, spgist, brin, and generic. Extensions may define additional resource managers. Only superusers and users with the appropriate SET privilege can change this setting.\u003c/p\u003e","SourceRevision":"english-manuals:e113b286f226ce6aec06209ec434a62efca8563b95e76281a8a6ef3c9cfcc347","ContentHash":"38d53e0afe0efa9885944da38edff1b5a293a25864bf7e01731aaf982c4381d8","Payload":{"description":"This parameter is intended to be used to check for bugs in the WAL redo routines. When enabled, full-page images of any buffers modified in conjunction with the WAL record are added to the record. If the record is subsequently replayed, the system will first apply each record and then test whether the buffers modified by the record match the stored images. In certain cases (such as hint bits), minor variations are acceptable, and will be ignored. Any unexpected differences will result in a fatal error, terminating recovery. The default value of this setting is the empty string, which disables the feature. It can be set to all to check all records, or to a comma-separated list of resource managers to check only records originating from those resource managers. Currently, the supported resource managers are heap, heap2, btree, hash, gin, gist, sequence, spgist, brin, and generic. Extensions may define additional resource managers. Only superusers and users with the appropriate SET privilege can change this setting."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
