{"Entry":{"collection":"guc","key":"commit_timestamp_buffers","name":"commit_timestamp_buffers","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Resource Usage / Memory","category_zh":"","changed_in":["18"],"changes":[{"documentation_changed":false,"fields":{},"from":"16","status":"added","to":"17"},{"documentation_changed":true,"fields":{"extra_desc":{"from":"Specify 0 to have this value determined as a fraction of shared_buffers.","to":"0 means use a fraction of \"shared_buffers\"."}},"from":"17","status":"changed","to":"18"}],"content_hash":"855c4c36829d97ce15cfbd7a137b4208fd6e864cd9947ff57d0331825400a088","context":"","default_changed_in":[],"default_history":[{"from":"17","to":"19","value":"0 B (0 × 8kB)"}],"editorial":{"advice":{"olap":"Analytical workload labels alone do not justify changing commit_timestamp_buffers; tune only when the underlying transaction-state facility, not table scans, is the measured bottleneck.","oltp":"Leave commit_timestamp_buffers at automatic or upstream sizing unless SLRU-specific I/O and contention prove this cache is undersized. A larger number consumes shared memory for the entire server lifetime.","small":"Keep commit_timestamp_buffers at its default on a small host. Moving scarce shared memory into an internal cache without direct evidence can reduce room for more valuable caches and processes."},"mechanism":["commit_timestamp_buffers allocates a dedicated startup-time shared buffer pool for pages in pg_commit_ts, the SLRU area used when commit timestamp tracking is enabled.","A configured zero is an automatic sizing request, not zero memory: PostgreSQL derives shared_buffers/512, clamps it to at least 16 and at most 1024 blocks, and allocates the result at server start.","The cache can reduce pg_commit_ts reads but does not enable commit timestamp collection; track_commit_timestamp is the separate functional switch. Increasing it consumes real shared memory. Its postmaster context fixes the value at server start; changing it requires a restart."],"pitfalls":["Changing commit_timestamp_buffers without applying its documented unit and configuration context.","Optimizing an isolated benchmark while ignoring concurrent aggregate resource use.","Assuming a configured value guarantees operating-system or storage behavior.","Failing to retest startup, failover, and workload latency after the change."],"references":[{"title":"PostgreSQL 19 Beta 4: commit_timestamp_buffers","url":"https://www.postgresql.org/docs/19/runtime-config-resource.html#GUC-COMMIT-TIMESTAMP-BUFFERS"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["track_commit_timestamp","shared_buffers","transaction_buffers","subtransaction_buffers"],"summary":"commit_timestamp_buffers — Sets the size of the dedicated buffer pool used for the commit timestamp cache. Observed in PG17–19 Beta 4; its last measured boot default is 0 B (0 × 8kB) in PG19 Beta 4, with postmaster context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"17","group":"Resource Usage","group_slug":"resource","imported_at":"2026-09-27T17:57:30.969974+08:00","intro_commit":{"authored_at":"2024-02-28T17:05:31+01:00","discussion":["https://postgr.es/m/2BEC2B3F-9B61-4C1D-9FB5-5FAB0F05EF86@yandex-team.ru","https://postgr.es/m/CAFiTN-vzDvNz=ExGXz6gdyjtzGixKSqs0mKHMmaQ8sOSEFZ33A@mail.gmail.com"],"hash":"53c2a97a92665be6bd7d70bd62ae6158fe4db96e","subject":"Improve performance of subsystems on top of SLRU","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=53c2a97a92665be6bd7d70bd62ae6158fe4db96e"},"key":"commit_timestamp_buffers","last_version":"20","max_val":"","min_val":"","name":"commit_timestamp_buffers","position":66,"present_in":["17","18","19","20"],"short_desc":"Specifies the amount of memory to use to cache the contents of pg_commit_ts (see Table 66.1).","short_desc_zh":"","source_rev":"english-manuals:b4aeedc782e0d198aa049e3bf758eeaaf355b2e9aae526e5c0de2486db9b58da","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"commit_timestamp_buffers","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"commit_timestamp_buffers","SourceRevision":"english-manuals:b4aeedc782e0d198aa049e3bf758eeaaf355b2e9aae526e5c0de2486db9b58da","Facts":{"boot_val":"0","category":"Resource Usage / Memory","context":"postmaster","description":"Specifies the amount of memory to use to cache the contents of pg_commit_ts (see Table 66.1). If this value is specified without units, it is taken as blocks, that is BLCKSZ bytes, typically 8kB. The default value is 0, which requests shared_buffers/512 up to 1024 blocks, but not fewer than 16 blocks. This parameter can only be set at server start.","doc":{"anchor":"GUC-COMMIT-TIMESTAMP-BUFFERS","file":"runtime-config-resource.html","lang":"en","sha256":"2e207c599f0884dfbe594558c478a2c7c132578981071e980e2015f31dfce28c","slug":"18"},"documented":true,"enumvals":null,"extra_desc":"0 means use a fraction of \"shared_buffers\".","lang":"en","max_val":"131072","metadata_version":"18","min_val":"0","name":"commit_timestamp_buffers","short_desc":"Sets the size of the dedicated buffer pool used for the commit timestamp cache.","source":"pg-settings-source-snapshot","unit":"8kB","vartype":"integer"},"ManualEvidence":{"doc":{"anchor":"GUC-COMMIT-TIMESTAMP-BUFFERS","file":"runtime-config-resource.html","lang":"en","sha256":"2e207c599f0884dfbe594558c478a2c7c132578981071e980e2015f31dfce28c","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"commit_timestamp_buffers","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"commit_timestamp_buffers","Summary":"","BodyHTML":"\u003cp\u003e指定用于缓存\u003ccode\u003epg_commit_ts\u003c/code\u003e内容的内存量（参见\u003ca href=\"/docs/18/storage-file-layout.html#PGDATA-CONTENTS-TABLE\" rel=\"nofollow\"\u003e表 66.1\u003c/a\u003e）。如果未指定单位，则视为块，即\u003ccode\u003eBLCKSZ\u003c/code\u003e字节，通常为 8kB。默认值为\u003ccode\u003e0\u003c/code\u003e，这会请求\u003ccode\u003eshared_buffers\u003c/code\u003e/512，最多 1024 个块、最少 16 个块。此参数只能在服务器启动时设置。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"0e3c05d4816d8e529e40894a74ab6fd38c6c75cbd64f57fa42f59f3a5229b7fc","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e指定用于缓存\u003ccode class=\"literal\"\u003epg_commit_ts\u003c/code\u003e内容的内存量（参见\u003ca href=\"/docs/18/storage-file-layout.html#PGDATA-CONTENTS-TABLE\" title=\"表 66.1. PGDATA 的内容\"\u003e表 66.1\u003c/a\u003e）。如果未指定单位，则视为块，即\u003ccode class=\"symbol\"\u003eBLCKSZ\u003c/code\u003e字节，通常为 8kB。默认值为\u003ccode class=\"literal\"\u003e0\u003c/code\u003e，这会请求\u003ccode class=\"varname\"\u003eshared_buffers\u003c/code\u003e/512，最多 1024 个块、最少 16 个块。此参数只能在服务器启动时设置。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
