diff options
author | Alvaro Herrera | 2021-11-30 17:29:31 +0000 |
---|---|---|
committer | Alvaro Herrera | 2021-11-30 17:29:31 +0000 |
commit | 4c83e59e01a89b0b19245b8e0317d87ae60226eb (patch) | |
tree | c805dea8cd1415b358cb15a84410c89a6153e8fa | |
parent | e7122548a3f754060db1767582148b3559fe8d43 (diff) |
Increase size of shared memory for pg_commit_ts
Like 5364b357fb11 did for pg_commit, change the formula used to
determine number of pg_commit_ts buffers, which helps performance with
larger servers.
Discussion: https://postgr.es/m/[email protected]
Reviewed-by: Noah Misch <[email protected]>
Reviewed-by: Tomas Vondra <[email protected]>
-rw-r--r-- | src/backend/access/transam/commit_ts.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c index 42ea8e53f2..cbbe19fea8 100644 --- a/src/backend/access/transam/commit_ts.c +++ b/src/backend/access/transam/commit_ts.c @@ -508,13 +508,14 @@ pg_xact_commit_timestamp_origin(PG_FUNCTION_ARGS) /* * Number of shared CommitTS buffers. * - * We use a very similar logic as for the number of CLOG buffers; see comments - * in CLOGShmemBuffers. + * We use a very similar logic as for the number of CLOG buffers (except we + * scale up twice as fast with shared buffers, and the maximum is twice as + * high); see comments in CLOGShmemBuffers. */ Size CommitTsShmemBuffers(void) { - return Min(16, Max(4, NBuffers / 1024)); + return Min(256, Max(4, NBuffers / 256)); } /* |