作者
digoal
日期
2021-12-02
标签
PostgreSQL , pg_commit_ts , buffer
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=4c83e59e01a89b0b19245b8e0317d87ae60226eb
Increase size of shared memory for pg_commit_ts
author Alvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 30 Nov 2021 17:29:31 +0000 (14:29 -0300)
committer Alvaro Herrera <alvherre@alvh.no-ip.org>
Tue, 30 Nov 2021 17:29:31 +0000 (14:29 -0300)
commit 4c83e59e01a89b0b19245b8e0317d87ae60226eb
tree c805dea8cd1415b358cb15a84410c89a6153e8fa tree
parent e7122548a3f754060db1767582148b3559fe8d43 commit | 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/20210115220744.GA24457@alvherre.pgsql
Reviewed-by: Noah Misch <noah@leadboat.com>
Reviewed-by: Tomas Vondra <tomas.vondra@enterprisedb.com>
- * 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));
}
期望 PostgreSQL 增加什么功能?
类似Oracle RAC架构的PostgreSQL已开源: 阿里云PolarDB for PostgreSQL云原生分布式开源数据库!
PostgreSQL 解决方案集合
德哥 / digoal's github - 公益是一辈子的事.

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




