Re: pgsql: Add function to log the memory contexts of specified backend pro

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
Cc: Fujii Masao <fujii(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Add function to log the memory contexts of specified backend pro
Date: 2025-05-01 12:42:05
Message-ID: CA+TgmoZfVES0SaS3NpP1kf__fW1ODc_wzVaNNC9HBHvERvh9xA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, May 1, 2025 at 3:53 AM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2025-05-01 14:32:24 pgsql: Remove extra "not" in pg_upgrade documentation.
Previous Message Dean Rasheed 2025-05-01 10:13:09 pgsql: doc: Warn that ts_headline() output is not HTML-safe.

Browse pgsql-hackers by date

  From Date Subject
Next Message Rahila Syed 2025-05-01 12:43:39 Re: Prevent an error on attaching/creating a DSM/DSA from an interrupt handler.
Previous Message Robert Haas 2025-05-01 12:40:21 Re: Prevent an error on attaching/creating a DSM/DSA from an interrupt handler.