v20251015-0011-fix-add-padding-for-pgproc-partitions.patch
text/x-patch
Filename: v20251015-0011-fix-add-padding-for-pgproc-partitions.patch
Type: text/x-patch
Part: 10
Message:
Re: Adding basic NUMA awareness
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v20251015-0011
Subject: fix: add padding for pgproc partitions
| File | + | − |
|---|---|---|
| src/backend/storage/lmgr/proc.c | 5 | 0 |
From 21ec8c1801857206947c6b08701493a05e5c82cb Mon Sep 17 00:00:00 2001
From: Tomas Vondra <tomas@vondra.me>
Date: Wed, 15 Oct 2025 17:32:29 +0200
Subject: [PATCH v20251015 11/12] fix: add padding for pgproc partitions
same as for fast-path locks
---
src/backend/storage/lmgr/proc.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index fc5e1969c36..cd938adbc33 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -163,6 +163,11 @@ PGProcShmemSize(void)
*
* XXX It might be more painful with very large huge pages (e.g. 1GB).
*/
+ if (((numa_flags & NUMA_PROCS) != 0) && numa_can_partition)
+ {
+ Assert(numa_nodes > 0);
+ size = add_size(size, mul_size((numa_nodes + 1), numa_page_size));
+ }
return size;
}
--
2.51.0