From: Robert Haas <robertmhaas@gmail.com>
To: Daniel Gustafsson <dgustafsson@postgresql.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Rahila Syed <rahilasyed90@gmail.com>
Subject: Re: pgsql: Add function to get memory context stats for processes
Date: Thu, 10 Apr 2025 09:31:00 -0400
Message-ID: <CA+Tgmoaey-kOP1k5FaUnQFd1fR0majVebWcL8ogfLbG_nt-Ytg@mail.gmail.com> (raw)
In-Reply-To: <E1u24yn-003Ggy-01@gemulon.postgresql.org>
References: <E1u24yn-003Ggy-01@gemulon.postgresql.org>
On Tue, Apr 8, 2025 at 5:10 AM Daniel Gustafsson
<dgustafsson@postgresql.org> wrote:
> Add function to get memory context stats for processes
Apologies if this has already been discussed, but what is the argument
that it is safe to do everything in ProcessGetMemoryContextInterrupt()
at an arbitrary CHECK_FOR_INTERRUPTS() call? We have
CHECK_FOR_INTERRUPTS() calls in some quite low-level places, such as
walkdir() and copydir(). I don't think there's any guarantee that it's
safe to perform DSA operations at an arbitrary place where
CHECK_FOR_INTERRUPTS() is called, and I'm not even quite sure that
it's safe to assume that the local memory-context tree is in a
consistent state when CHECK_FOR_INTERRUPTS() is called. If there is
some existing discussion of this that I should read, please point me
in the right direction; I didn't see anything in a quick look through
the commit.
Thanks,
--
Robert Haas
EDB: http://www.enterprisedb.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: robertmhaas@gmail.com, dgustafsson@postgresql.org, pgsql-hackers@lists.postgresql.org, rahilasyed90@gmail.com
Subject: Re: pgsql: Add function to get memory context stats for processes
In-Reply-To: <CA+Tgmoaey-kOP1k5FaUnQFd1fR0majVebWcL8ogfLbG_nt-Ytg@mail.gmail.com>
References: <E1u24yn-003Ggy-01@gemulon.postgresql.org> <CA+Tgmoaey-kOP1k5FaUnQFd1fR0majVebWcL8ogfLbG_nt-Ytg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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