agora inbox for pgpool-committers@postgresql.org  
help / color / mirror / Atom feed
From: Taiki Koshino <koshino@sraoss.co.jp>
To: pgpool-committers@lists.postgresql.org
Subject: pgpool: Convert lifecheck_exit_handler to flag-only.
Date: Wed, 16 Sep 2026 08:36:04 +0000
Message-ID: <E1x6l7c-0000000Copo-0lzC@gothos.postgresql.org> (raw)

Convert lifecheck_exit_handler to flag-only.

The watchdog lifecheck exit handler performed non-async-signal-safe
operations, including ereport(), wait(), pfree(), and exit(). The memory
cleanup could also conflict with MemoryContext operations interrupted by
the signal handler.

Changes:
Flag-only Signal Handler: Make lifecheck_exit_handler() only record the
signal and set volatile sig_atomic_t flags while preserving errno.

Normal-context Cleanup: Move child termination, cleanup, and process exit
to process_lifecheck_exit_request().

Reported-by: Emond Papegaaij <emond.papegaaij@gmail.com>
Reported-by: Claude Code
Author: Taiki Koshino <koshino@sraoss.co.jp>
Discussion: https://www.postgresql.org/message-id/OS9P286MB6486FF7EC3D412F5D9B2E45F94AE2%40OS9P286MB6486.JPNP286...
Backpatch-through: v4.3

Branch
------
V4_4_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=fccee62148a0766bb6c7c09d98ddeaf5d2463...

Modified Files
--------------
src/watchdog/wd_lifecheck.c | 49 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)



view thread (6+ messages)  latest in thread

Message-ID: <E1x6l7c-0000000Copo-0lzC@gothos.postgresql.org>
Permalink:  ../E1x6l7c-0000000Copo-0lzC@gothos.postgresql.org/
Also on:    postgresql.org/message-id/E1x6l7c-0000000Copo-0lzC@gothos.postgresql.org

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: pgpool-committers@postgresql.org
  Cc: koshino@sraoss.co.jp, pgpool-committers@lists.postgresql.org
  Subject: Re: pgpool: Convert lifecheck_exit_handler to flag-only.
  In-Reply-To: <E1x6l7c-0000000Copo-0lzC@gothos.postgresql.org>

* 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