agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
[PATCH v2] Accept unmapped NUMA pages
1+ messages / 1 participants
[nested] [flat]

* [PATCH v2] Accept unmapped NUMA pages
@ 2025-06-23 15:50 Christoph Berg <myon@debian.org>
  0 siblings, 0 replies; 1+ messages in thread

From: Christoph Berg @ 2025-06-23 15:50 UTC (permalink / raw)

We are touching all shared memory pages so move_pages can report their
status from our address space, but this might still leave some status
numbers to be negative error codes; -14 (EFAULT) was seen on 32-bit
Linux. Instead of erroring out, skip over these entries.
---
 src/backend/storage/ipc/shmem.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c
index c9ae3b45b76..21c1e5b2d62 100644
--- a/src/backend/storage/ipc/shmem.c
+++ b/src/backend/storage/ipc/shmem.c
@@ -700,13 +700,8 @@ pg_get_shmem_allocations_numa(PG_FUNCTION_ARGS)
 			int			s = pages_status[i];
 
 			/* Ensure we are adding only valid index to the array */
-			if (s < 0 || s > max_nodes)
-			{
-				elog(ERROR, "invalid NUMA node id outside of allowed range "
-					 "[0, " UINT64_FORMAT "]: %d", max_nodes, s);
-			}
-
-			nodes[s]++;
+			if (s >= 0 && s <= max_nodes)
+				nodes[s]++;
 		}
 
 		/*
-- 
2.47.2


--nT8dEFd4v/xnwLii--





^ permalink  raw  reply  [nested|flat] 1+ messages in thread


only message in thread

Thread overview: 1+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-06-23 15:50 [PATCH v2] Accept unmapped NUMA pages Christoph Berg <myon@debian.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox