{"Entry":{"collection":"guc","key":"debug_assertions","name":"debug_assertions","aliases":[],"metadata":{"baseline":true,"boot_human":"Not specified","boot_val":null,"category":"Preset Options","category_zh":"","changed_in":["9.5"],"changes":[{"documentation_changed":true,"fields":{},"from":"7.4","status":"changed","to":"8.0"},{"documentation_changed":true,"fields":{},"from":"8.1","status":"changed","to":"8.2"},{"documentation_changed":true,"fields":{"category":{"from":"Developer Options","to":"Preset Options"},"context":{"from":"user","to":"internal"},"extra_desc":{"from":"This is a debugging aid.","to":null},"short_desc":{"from":"Turns on various assertion checks.","to":"Shows whether the running server has assertion checks enabled."}},"from":"9.4","status":"changed","to":"9.5"}],"content_hash":"cde4cf961a82ca21fd043879808d07a206366357ccea15e9766b05309f276d45","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"off"}],"editorial":{"advice":{"olap":"Not tunable. Use debug_assertions to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.","oltp":"Not tunable. Record debug_assertions as a deployment/capability fact; if it is unexpected, fix the binary, initdb, or database-creation process rather than trying SET.","small":"Not tunable. Preserve it in inventory and incident reports; do not custom-build or rebuild merely to change it without a demonstrated compatibility need."},"mechanism":["Shows whether the running server has assertion checks enabled. It is read-only and cannot be changed with SET or configuration-file edits.","It reflects whether the server binary was built with assertion checks, a developer diagnostic that adds overhead and may abort on violated invariants.","Interpret it with server_version, server_version_num, server_encoding. Applications and operations tooling may read debug_assertions for capability or environment detection, but cannot SET it; cross-cluster comparisons must account for build, initdb, and current-database differences."],"pitfalls":["Trying to change read-only debug_assertions with SET or a configuration file.","Assuming every cluster, database, or vendor build reports the same value.","Ignoring the value in file-format or feature-compatibility checks.","Treating reported metadata as a performance target instead of an environment fact."],"references":[{"title":"PostgreSQL 19 Beta 4: debug_assertions","url":"https://www.postgresql.org/docs/19/runtime-config-preset.html#GUC-DEBUG-ASSERTIONS"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["server_version","server_version_num","server_encoding","ssl_library","integer_datetimes","block_size"],"summary":"debug_assertions — Shows whether the running server has assertion checks enabled. Observed in PG9.0–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":"7.4","group":"Preset Options","group_slug":"preset","imported_at":"2026-09-27T17:57:31.032162+08:00","intro_commit":{},"key":"debug_assertions","last_version":"20","max_val":"","min_val":"","name":"debug_assertions","position":82,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Reports whether PostgreSQL has been built with assertions enabled.","short_desc_zh":"","source_rev":"english-manuals:222e18707708052fe4a9a5f6bc091f4867efc58472708d20cf8e9b137ef20666","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"debug_assertions","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"debug_assertions","SourceRevision":"english-manuals:222e18707708052fe4a9a5f6bc091f4867efc58472708d20cf8e9b137ef20666","Facts":{"boot_val":"off","category":"Preset Options","context":"internal","description":"Reports whether PostgreSQL has been built with assertions enabled. That is the case if the macro USE_ASSERT_CHECKING is defined when PostgreSQL is built (accomplished e.g., by the configure option --enable-cassert). By default PostgreSQL is built without assertions.","doc":{"anchor":"GUC-DEBUG-ASSERTIONS","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":"debug_assertions","short_desc":"Shows whether the running server has assertion checks enabled.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-DEBUG-ASSERTIONS","file":"runtime-config-preset.html","lang":"en","sha256":"4dbfec727b9cee838adefb8a766217748d91ab90190b452a58cec737459582ce","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"debug_assertions","SourceDatabase":"center","Version":"18","Locale":"en","Title":"debug_assertions","Summary":"Reports whether PostgreSQL has been built with assertions enabled. That is the case if the macro USE_ASSERT_CHECKING is defined when PostgreSQL is built (accomplished e.g., by the configure option --enable-cassert). By default PostgreSQL is built without assertions.","BodyHTML":"\u003cp\u003eReports whether PostgreSQL has been built with assertions enabled. That is the case if the macro USE_ASSERT_CHECKING is defined when PostgreSQL is built (accomplished e.g., by the configure option --enable-cassert). By default PostgreSQL is built without assertions.\u003c/p\u003e","SourceRevision":"english-manuals:222e18707708052fe4a9a5f6bc091f4867efc58472708d20cf8e9b137ef20666","ContentHash":"29d3cfe53ede307732fb241162ccce88509d6ed83b9c96a62d962fb1cd23bdaf","Payload":{"description":"Reports whether PostgreSQL has been built with assertions enabled. That is the case if the macro USE_ASSERT_CHECKING is defined when PostgreSQL is built (accomplished e.g., by the configure option --enable-cassert). By default PostgreSQL is built without assertions."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
