public inbox for [email protected]
help / color / mirror / Atom feedFrom: Heikki Linnakangas <[email protected]>
To: Tomas Vondra <[email protected]>
To: Bertrand Drouvot <[email protected]>
Cc: Christoph Berg <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Tomas Vondra <[email protected]>
Cc: [email protected]
Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view
Date: Thu, 12 Feb 2026 16:21:21 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On 01/07/2025 14:03, Tomas Vondra wrote:
> Thanks! Pushed, with both adjustments (link to kernel thread, adding the
> commit hash).
I just noticed that this (commit bf1119d74a: Add CHECK_FOR_INTERRUPTS
into pg_numa_query_pages) made the function unusable in frontend
programs, because CHECK_FOR_INTERRUPTS is server only. It's not used in
frontend programs today, but it was placed in src/port/ with the idea
that it could be.
That's pretty easy to fix by wrapping it in an "#ifndef FRONTEND" block,
per attached.
- Heikki
Attachments:
[text/x-patch] 0001-Make-pg_numa_query_pages-work-in-frontend-programs.patch (1.1K, 2-0001-Make-pg_numa_query_pages-work-in-frontend-programs.patch)
download | inline diff:
From 92e66ea5f17cacfb3408d2af51b9d24d4413cc9e Mon Sep 17 00:00:00 2001
From: Heikki Linnakangas <[email protected]>
Date: Thu, 12 Feb 2026 16:11:44 +0200
Subject: [PATCH 1/1] Make pg_numa_query_pages() work in frontend programs
It's currently only used in the server, but it was placed in src/port
with the idea that it might be useful in client programs too. However,
it will currently fail to link if used in a client program, because
CHECK_FOR_INTERRUPTS() is not usable in client programs. Fix that by
wrapping it in "#ifndef FRONTEND".
---
src/port/pg_numa.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/port/pg_numa.c b/src/port/pg_numa.c
index d574a686b42..8954669273a 100644
--- a/src/port/pg_numa.c
+++ b/src/port/pg_numa.c
@@ -87,7 +87,9 @@ pg_numa_query_pages(int pid, unsigned long count, void **pages, int *status)
unsigned long count_chunk = Min(count - next,
NUMA_QUERY_CHUNK_SIZE);
+#ifndef FRONTEND
CHECK_FOR_INTERRUPTS();
+#endif
/*
* Bail out if any of the chunks errors out (ret<0). We ignore (ret>0)
--
2.47.3
view thread (83+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: pgsql: Introduce pg_shmem_allocations_numa view
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox