{"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)"}],"derived_content_hash":"31aeb927f396b00636423f6b6e7db908196a8d1d97c1d1b36f491ae0576660d7","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"],"repair_provenance":{"original_source_revision":"english-manuals:b4aeedc782e0d198aa049e3bf758eeaaf355b2e9aae526e5c0de2486db9b58da","receipt_sha256":"cb55e73a388f107489e3a1d00f0781b5925bdb431180f9ad97499c5603f43a4e","repair":"wiki-repair-20261023"},"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":"wiki-repair-20261023:487e34b0c6e62dd5c7c66bad29d714c7fef82e6633f9638245595c77b4a542df","unit":"","vartype":"integer"}},"Definition":{"Collection":"guc","Key":"commit_timestamp_buffers","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"commit_timestamp_buffers","SourceRevision":"wiki-repair-20261023:487e34b0c6e62dd5c7c66bad29d714c7fef82e6633f9638245595c77b4a542df","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.","description_zh":"指定用于缓存 pg_commit_ts 内容的内存量（参见表 66.1）。如果未指定单位，则视为块，即 BLCKSZ 字节，通常为 8kB。默认值为 0，这会请求 shared_buffers/512，最多 1024 个块、最少 16 个块。此参数只能在服务器启动时设置。","description_zh_html":"\u003cp\u003e\n        指定用于缓存 \u003ccode class=\"literal\"\u003epg_commit_ts\u003c/code\u003e 内容的内存量（参见\u003ca class=\"xref\" href=\"/zh/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 个块。此参数只能在服务器启动时设置。\n       \u003c/p\u003e","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","translation_provenance":{"inputs":[{"kind":"current-pgdoc-translation","path":"/Users/vonng/pgsty/pgdoc/zh/18/html/runtime-config-resource.html","sha256":"f5fedbf88ec5f973aaf4e525c03e46dda2a2186dabee154e26780da96b2ac85a"}],"kind":"same-version-pgdoc","locale":"zh-Hans","source_revision":"b1b500221dbe5437cfca004d6b04d3f6e422765d","version":"18"},"unit":"8kB","vartype":"integer","zh_from":"same-version-pgdoc"},"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":"center","Version":"18","Locale":"en","Title":"commit_timestamp_buffers","Summary":"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.","BodyHTML":"\u003cp\u003eSpecifies 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.\u003c/p\u003e","SourceRevision":"wiki-repair-20261023:487e34b0c6e62dd5c7c66bad29d714c7fef82e6633f9638245595c77b4a542df","ContentHash":"ae23140a67c7777b45956c9bd98d9edb4410274992809bac1829191209d31ae3","Payload":{"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."}},"RequestedLocale":"en","Fallback":false,"Versions":["17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
