pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: pg_buffercache: Fix memory allocation formula 2+ messages / 1 participants [nested] [flat]
* pgsql: pg_buffercache: Fix memory allocation formula @ 2025-12-11 05:12 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2025-12-11 05:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_buffercache: Fix memory allocation formula The code over-allocated the memory required for os_page_status, relying on uint64 for its element size instead of an int, hence doubling what was required. This could mean quite a lot of memory if dealing with a lot of NUMA pages. Oversight in ba2a3c2302f1. Author: David Geier <geidav.pg@gmail.com> Discussion: https://postgr.es/m/ad0748d4-3080-436e-b0bc-ac8f86a3466a@gmail.com Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3f83de20ba2e1d4bd557d92b3436ca04b7c947a8 Modified Files -------------- contrib/pg_buffercache/pg_buffercache_pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: pg_buffercache: Fix memory allocation formula @ 2025-12-11 05:12 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2025-12-11 05:12 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org pg_buffercache: Fix memory allocation formula The code over-allocated the memory required for os_page_status, relying on uint64 for its element size instead of an int, hence doubling what was required. This could mean quite a lot of memory if dealing with a lot of NUMA pages. Oversight in ba2a3c2302f1. Author: David Geier <geidav.pg@gmail.com> Discussion: https://postgr.es/m/ad0748d4-3080-436e-b0bc-ac8f86a3466a@gmail.com Backpatch-through: 18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/580b5c2f397fbb2f74c2661cfe53203ed6acead0 Modified Files -------------- contrib/pg_buffercache/pg_buffercache_pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-12-11 05:12 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-12-11 05:12 pgsql: pg_buffercache: Fix memory allocation formula Michael Paquier <michael@paquier.xyz> 2025-12-11 05:12 pgsql: pg_buffercache: Fix memory allocation formula Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox