Skip to content

Commit 4c83e59

Browse files
committed
Increase size of shared memory for pg_commit_ts
Like 5364b35 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/20210115220744.GA24457@alvherre.pgsql Reviewed-by: Noah Misch <noah@leadboat.com> Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>
1 parent e712254 commit 4c83e59

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/backend/access/transam/commit_ts.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,13 +508,14 @@ pg_xact_commit_timestamp_origin(PG_FUNCTION_ARGS)
508508
/*
509509
* Number of shared CommitTS buffers.
510510
*
511-
* We use a very similar logic as for the number of CLOG buffers; see comments
512-
* in CLOGShmemBuffers.
511+
* We use a very similar logic as for the number of CLOG buffers (except we
512+
* scale up twice as fast with shared buffers, and the maximum is twice as
513+
* high); see comments in CLOGShmemBuffers.
513514
*/
514515
Size
515516
CommitTsShmemBuffers(void)
516517
{
517-
return Min(16, Max(4, NBuffers / 1024));
518+
return Min(256, Max(4, NBuffers / 256));
518519
}
519520

520521
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy