{"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"}],"derived_content_hash":"b6e62f3368dba4349678f7ffabdc1b494a933a32c8c4de439929dce5e516d659","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"],"repair_provenance":{"original_source_revision":"english-manuals:86fe77715808c5a90dd23c332962f283a75703700275441fb02ca03e496d1cf0","receipt_sha256":"a89ab2305bf7d7568b7edd1e6a688eb3f08f06279bee9c019026eebcf9275f9f","repair":"wiki-repair-20261023"},"short_desc":"Reports the size of a disk block.","short_desc_zh":"","source_rev":"wiki-repair-20261023:49ad958e28b12bb02e2b77d719ccecb4b2324cb9649c5fcbd43b92132d01fefc","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"block_size","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"block_size","SourceRevision":"wiki-repair-20261023:49ad958e28b12bb02e2b77d719ccecb4b2324cb9649c5fcbd43b92132d01fefc","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.","description_zh":"报告一个磁盘块的大小。它由编译服务器时 BLCKSZ 的值确定。默认值是 8192 字节。有些配置变量的含义（例如 shared_buffers）会被 block_size 影响。详见第 19.4 节。","description_zh_html":"\u003cp\u003e\n        报告一个磁盘块的大小。它由编译服务器时 \u003ccode class=\"literal\"\u003eBLCKSZ\u003c/code\u003e 的值确定。默认值是 8192 字节。有些配置变量的含义（例如 \u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-resource.html#GUC-SHARED-BUFFERS\"\u003eshared_buffers\u003c/a\u003e）会被 \u003ccode class=\"varname\"\u003eblock_size\u003c/code\u003e 影响。详见\u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-resource.html\" title=\"19.4. 资源消耗\"\u003e第 19.4 节\u003c/a\u003e。\n       \u003c/p\u003e","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","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-preset.html","sha256":"d0e95b9a81d5fdf853df26eba7dc096d96b9b45dadda13e0d0353aa72ac7a7b9"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":null,"vartype":"integer","zh_from":"same-version-pgdoc"},"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":"center","Version":"18","Locale":"en","Title":"block_size","Summary":"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.","BodyHTML":"\u003cp\u003eReports 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.\u003c/p\u003e","SourceRevision":"wiki-repair-20261023:49ad958e28b12bb02e2b77d719ccecb4b2324cb9649c5fcbd43b92132d01fefc","ContentHash":"4dfa74a0566b67423a376261ee6ef7adca9cd8e2350dd13a0c0970294403f41b","Payload":{"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."}},"RequestedLocale":"en","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}
