{"Entry":{"collection":"guc","key":"wal_segment_size","name":"wal_segment_size","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Preset Options","category_zh":"","changed_in":["11"],"changes":[{"documentation_changed":false,"fields":{},"from":"8.3","status":"added","to":"8.4"},{"documentation_changed":true,"fields":{},"from":"8.4","status":"changed","to":"9.0"},{"documentation_changed":true,"fields":{},"from":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{"boot_val":{"from":"2048","to":"16777216"},"max_val":{"from":"2048","to":"1073741824"},"min_val":{"from":"2048","to":"1048576"},"short_desc":{"from":"Shows the number of pages per write ahead log segment.","to":"Shows the size of write ahead log segments."},"unit":{"from":"8kB","to":"B"}},"from":"10","status":"changed","to":"11"},{"documentation_changed":true,"fields":{},"from":"11","status":"changed","to":"12"},{"documentation_changed":true,"fields":{},"from":"13","status":"changed","to":"14"},{"documentation_changed":true,"fields":{},"from":"16","status":"changed","to":"17"}],"content_hash":"fa49bd9fc7415f88c7ab777686e49e716d80e85708534a8f4827d3c6c897993f","context":"","default_changed_in":["11"],"default_history":[{"from":"9.0","to":"10","value":"16 MiB (2048 × 8kB)"},{"from":"11","to":"19","value":"16 MiB"}],"editorial":{"advice":{"olap":"Not tunable. Use wal_segment_size to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.","oltp":"Not tunable. Record wal_segment_size 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 the size of write ahead log segments. It is read-only and cannot be changed with SET or configuration-file edits.","It reports the WAL segment size. PostgreSQL 11 and later choose it at initdb time; older clusters normally inherit the build-time value.","Interpret it with min_wal_size, max_wal_size, wal_keep_size. Applications and operations tooling may read wal_segment_size 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 wal_segment_size 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: wal_segment_size","url":"https://www.postgresql.org/docs/19/runtime-config-preset.html#GUC-WAL-SEGMENT-SIZE"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["min_wal_size","max_wal_size","wal_keep_size","checkpoint_timeout","checkpoint_completion_target","wal_keep_segments"],"summary":"wal_segment_size — Shows the size of write ahead log segments. Observed in PG9.0–19 Beta 4; its last measured boot default is 16 MiB in PG19 Beta 4, with internal context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"8.4","group":"Preset Options","group_slug":"preset","imported_at":"2026-09-27T17:57:32.363219+08:00","intro_commit":{},"key":"wal_segment_size","last_version":"20","max_val":"","min_val":"","name":"wal_segment_size","position":478,"present_in":["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 the size of write ahead log segments.","short_desc_zh":"","source_rev":"english-manuals:7c1d27cb3883b9ef2c43aeeaefb2ba76a53b5bfca67f6507f92b91580d277de6","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"wal_segment_size","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"wal_segment_size","SourceRevision":"english-manuals:7c1d27cb3883b9ef2c43aeeaefb2ba76a53b5bfca67f6507f92b91580d277de6","Facts":{"boot_val":"16777216","category":"Preset Options","context":"internal","description":"Reports the size of write ahead log segments. The default value is 16MB. See Section 28.5 for more information.","doc":{"anchor":"GUC-WAL-SEGMENT-SIZE","file":"runtime-config-preset.html","lang":"en","sha256":"4dbfec727b9cee838adefb8a766217748d91ab90190b452a58cec737459582ce","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"1073741824","metadata_version":"18","min_val":"1048576","name":"wal_segment_size","short_desc":"Shows the size of write ahead log segments.","source":"pg-settings-source-snapshot","unit":"B","vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-WAL-SEGMENT-SIZE","file":"runtime-config-preset.html","lang":"en","sha256":"4dbfec727b9cee838adefb8a766217748d91ab90190b452a58cec737459582ce","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"wal_segment_size","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"wal_segment_size","Summary":"","BodyHTML":"\u003cp\u003e报告 WAL 段文件的大小。默认是 16MB。详见\u003ca href=\"/docs/18/wal-configuration.html\" rel=\"nofollow\"\u003e第 28.5 节\u003c/a\u003e。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"750c0ad05dc14609c9843264a994d128a3945d2bae1c0ff97d876eec214be2fe","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e报告 WAL 段文件的大小。默认是 16MB。详见\u003ca href=\"/docs/18/wal-configuration.html\" title=\"28.5. WAL 配置\"\u003e第 28.5 节\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","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
