projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e712254
)
Increase size of shared memory for pg_commit_ts
author
Alvaro Herrera
<
[email protected]
>
Tue, 30 Nov 2021 17:29:31 +0000
(14:29 -0300)
committer
Alvaro Herrera
<
[email protected]
>
Tue, 30 Nov 2021 17:29:31 +0000
(14:29 -0300)
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/
20210115220744
[email protected]
Reviewed-by: Noah Misch <
[email protected]
>
Reviewed-by: Tomas Vondra <
[email protected]
>
src/backend/access/transam/commit_ts.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/access/transam/commit_ts.c
b/src/backend/access/transam/commit_ts.c
index 42ea8e53f2c3f81a3cd93aad061856fd63dfb341..cbbe19fea83a6dc9665f75ba1be2c4e9b19a1014 100644
(file)
--- 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
));
}
/*