{"Entry":{"collection":"guc","key":"block_size","name":"block_size","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Preset Options","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"7.4","status":"added","to":"8.0"},{"documentation_changed":true,"fields":{},"from":"8.0","status":"changed","to":"8.1"},{"documentation_changed":true,"fields":{},"from":"8.2","status":"changed","to":"8.3"},{"documentation_changed":true,"fields":{},"from":"9.5","status":"changed","to":"9.6"},{"documentation_changed":true,"fields":{},"from":"13","status":"changed","to":"14"},{"documentation_changed":true,"fields":{},"from":"16","status":"changed","to":"17"}],"content_hash":"ff854af71d8b9c6c4b6e82593bc5c2d0d5678ff13b4c6ec3d636a2d1b9ee4560","context":"","default_changed_in":[],"default_history":[{"from":"9.0","to":"19","value":"8192"}],"editorial":{"advice":{"olap":"Not tunable. Use block_size to verify format, build, or resource assumptions on analytical nodes and keep every read/write candidate compatible.","oltp":"Not tunable. Record block_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 a disk block. It is read-only and cannot be changed with SET or configuration-file edits.","It reflects BLCKSZ, normally 8 KiB, chosen when PostgreSQL was built; all heap and index page layouts depend on it.","Interpret it with wal_block_size, wal_segment_size, segment_size. Applications and operations tooling may read block_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 block_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: block_size","url":"https://www.postgresql.org/docs/19/runtime-config-preset.html#GUC-BLOCK-SIZE"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["wal_block_size","wal_segment_size","segment_size","data_checksums","server_version_num","max_function_args"],"summary":"block_size — Shows the size of a disk block. Observed in PG9.0–19 Beta 4; its last measured boot default is 8192 in PG19 Beta 4, with internal context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"8.0","group":"Preset Options","group_slug":"preset","imported_at":"2026-09-27T17:57:30.902399+08:00","intro_commit":{},"key":"block_size","last_version":"20","max_val":"","min_val":"","name":"block_size","position":50,"present_in":["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 the size of a disk block.","short_desc_zh":"","source_rev":"english-manuals:86fe77715808c5a90dd23c332962f283a75703700275441fb02ca03e496d1cf0","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"block_size","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"block_size","SourceRevision":"english-manuals:86fe77715808c5a90dd23c332962f283a75703700275441fb02ca03e496d1cf0","Facts":{"boot_val":"8192","category":"Preset Options","context":"internal","description":"Reports the size of a disk block. It is determined by the value of BLCKSZ when building the server. The default value is 8192 bytes. The meaning of some configuration variables (such as shared_buffers) is influenced by block_size. See Section 19.4 for information.","doc":{"anchor":"GUC-BLOCK-SIZE","file":"runtime-config-preset.html","lang":"en","sha256":"4dbfec727b9cee838adefb8a766217748d91ab90190b452a58cec737459582ce","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":"8192","metadata_version":"18","min_val":"8192","name":"block_size","short_desc":"Shows the size of a disk block.","source":"pg-settings-source-snapshot","unit":null,"vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-BLOCK-SIZE","file":"runtime-config-preset.html","lang":"en","sha256":"4dbfec727b9cee838adefb8a766217748d91ab90190b452a58cec737459582ce","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"block_size","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"block_size","Summary":"","BodyHTML":"\u003cp\u003e报告一个磁盘块的大小。它由编译服务器时\u003ccode\u003eBLCKSZ\u003c/code\u003e的值确定。默认值是 8192 字节。有些配置变量的含义（例如\u003ca href=\"/docs/18/runtime-config-resource.html#GUC-SHARED-BUFFERS\" rel=\"nofollow\"\u003eshared_buffers\u003c/a\u003e）会被\u003ccode\u003eblock_size\u003c/code\u003e影响。详见\u003ca href=\"/docs/18/runtime-config-resource.html\" rel=\"nofollow\"\u003e第 19.4 节\u003c/a\u003e。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"f4c213a45023aeb66846455622272d82895d52da0a8fca5b31604806b847c809","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e报告一个磁盘块的大小。它由编译服务器时\u003ccode class=\"literal\"\u003eBLCKSZ\u003c/code\u003e的值确定。默认值是 8192 字节。有些配置变量的含义（例如\u003ca href=\"/docs/18/runtime-config-resource.html#GUC-SHARED-BUFFERS\"\u003eshared_buffers\u003c/a\u003e）会被\u003ccode class=\"varname\"\u003eblock_size\u003c/code\u003e影响。详见\u003ca href=\"/docs/18/runtime-config-resource.html\" title=\"19.4. 资源消耗\"\u003e第 19.4 节\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.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","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
