{"Entry":{"collection":"guc","key":"data_checksums","name":"data_checksums","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Preset Options","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"9.2","status":"added","to":"9.3"},{"documentation_changed":true,"fields":{},"from":"17","status":"changed","to":"18"},{"documentation_changed":true,"fields":{},"from":"18","status":"changed","to":"19"},{"documentation_changed":true,"fields":{},"from":"19","status":"changed","to":"20"}],"content_hash":"ba99491bc8e242212501e74d3871249e8740317615715599d4296f8622fc21b6","context":"","default_changed_in":[],"default_history":[{"from":"9.3","to":"19","value":"off"}],"editorial":{"advice":{"olap":"Budget the checksum CPU and full-cluster enable/disable scan on the actual dataset. Verify backup and replica compatibility before the offline transition.","oltp":"Treat the value as an integrity capability, not a performance knob. Prefer checksums for persistent clusters and monitor checksum failures; use a planned offline pg_checksums procedure for an existing cluster.","small":"Enable at initdb when possible. For an existing small cluster, pg_checksums is usually simpler than a rebuild, but still requires shutdown and a recoverable backup."},"mechanism":["Reports the cluster-wide data-checksum state stored in the control file. It is internal/read-only in SQL and cannot be changed with SET.","Checksums are chosen by initdb or changed later with the server stopped by pg_checksums. PostgreSQL verifies page checksums when reading from storage and computes them when writing pages.","A checksum detects a torn or corrupted page; it does not repair it or prove that WAL, backups, memory, and every storage layer are healthy. Changes require an offline procedure, capacity for a full-cluster scan, and a verified backup."],"pitfalls":["Trying to change the read-only report with SET or ALTER SYSTEM.","Running pg_checksums while the server is not cleanly shut down.","Treating a checksum failure as repairable by ignoring the error.","Assuming checksums validate WAL records, logical correctness, or backups by themselves.","Enabling checksums without monitoring checksum failures and storage health."],"references":[{"title":"PostgreSQL 19 Beta 4: data_checksums","url":"https://www.postgresql.org/docs/19/runtime-config-preset.html#GUC-DATA-CHECKSUMS"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["ignore_checksum_failure","zero_damaged_pages","wal_log_hints","full_page_writes","data_directory","block_size"],"summary":"data_checksums — Shows whether data checksums are turned on for this cluster. Observed in PG9.3–19 Beta 4; its last measured boot default is off in PG19 Beta 4, with internal context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"9.3","group":"Preset Options","group_slug":"preset","imported_at":"2026-09-27T17:57:31.008115+08:00","intro_commit":{"authored_at":"2013-09-16T14:36:01+03:00","discussion":[],"hash":"5a7e75849cb595943fc605c4532716e9dd69f8a0","subject":"Add a GUC to report whether data page checksums are enabled.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5a7e75849cb595943fc605c4532716e9dd69f8a0"},"key":"data_checksums","last_version":"20","max_val":"","min_val":"","name":"data_checksums","position":76,"present_in":["9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Reports whether data checksums are enabled for this cluster.","short_desc_zh":"","source_rev":"english-manuals:81608db6c9fa689a62a0fa69c5ab43b207f83bc466f0dc234aa59289c7dc8bde","unit":"","vartype":"enum"}},"Definition":{"Collection":"guc","Key":"data_checksums","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"data_checksums","SourceRevision":"english-manuals:81608db6c9fa689a62a0fa69c5ab43b207f83bc466f0dc234aa59289c7dc8bde","Facts":{"boot_val":"off","category":"Preset Options","context":"internal","description":"Reports whether data checksums are enabled for this cluster. See -k for more information.","doc":{"anchor":"GUC-DATA-CHECKSUMS","file":"runtime-config-preset.html","lang":"en","sha256":"4dbfec727b9cee838adefb8a766217748d91ab90190b452a58cec737459582ce","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"data_checksums","short_desc":"Shows whether data checksums are turned on for this cluster.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-DATA-CHECKSUMS","file":"runtime-config-preset.html","lang":"en","sha256":"4dbfec727b9cee838adefb8a766217748d91ab90190b452a58cec737459582ce","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"data_checksums","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"data_checksums","Summary":"","BodyHTML":"\u003cp\u003e报告对这个集簇是否启用了数据校验和。详见\u003ca href=\"/docs/18/app-initdb.html#APP-INITDB-DATA-CHECKSUMS\" rel=\"nofollow\"\u003e\u003ccode\u003e-k\u003c/code\u003e\u003c/a\u003e。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"93caf760d6f200e0ae12a957237188d9bb0c951a6bc2ebab29b0261f888e583f","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e报告对这个集簇是否启用了数据校验和。详见\u003ca href=\"/docs/18/app-initdb.html#APP-INITDB-DATA-CHECKSUMS\"\u003e\u003ccode class=\"option\"\u003e-k\u003c/code\u003e\u003c/a\u003e。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
