Re: pgsql: Add function to log the memory contexts of specified backend pro - Mailing list pgsql-hackers

From Robert Haas
Subject Re: pgsql: Add function to log the memory contexts of specified backend pro
Date
Msg-id CA+TgmoZfVES0SaS3NpP1kf__fW1ODc_wzVaNNC9HBHvERvh9xA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add function to log the memory contexts of specified backend pro  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: pgsql: Add function to log the memory contexts of specified backend pro
List pgsql-hackers
On Thu, May 1, 2025 at 3:53 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
> Just idea, what do you think about adding a flag to indicate whether
> ProcessLogMemoryContextInterrupt() is currently running? Then,
> when a backend receives a signal and ProcessLogMemoryContextInterrupt()
> is invoked, it can simply return immediately if the flag is already set
> like this:

I think that something like this could work, but you would need more
than this. Otherwise, if the function errors out, the flag would
remain permanently set.

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Prevent an error on attaching/creating a DSM/DSA from an interrupt handler.
Next
From: Rahila Syed
Date:
Subject: Re: Prevent an error on attaching/creating a DSM/DSA from an interrupt handler.