pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make archiver's SIGQUIT handler exit via _exit().
Date: Wed, 09 Sep 2020 19:33:02 +0000
Message-ID: <E1kG5q2-0004dP-Jq@gemulon.postgresql.org> (raw)

Make archiver's SIGQUIT handler exit via _exit().

Commit 8e19a8264 changed the SIGQUIT handlers of almost all server
processes not to run atexit callbacks.  The archiver process was
skipped, perhaps because it's not connected to shared memory; but
it's just as true here that running atexit callbacks in a signal
handler is unsafe.  So let's make it work like the rest.

In HEAD and v13, we can use the common SignalHandlerForCrashExit
handler.  Before that, just tweak pgarch_exit to use _exit(2)
explicitly.

Like the previous commit, back-patch to all supported branches.

Kyotaro Horiguchi, back-patching by me

Discussion: https://postgr.es/m/1850884.1599601164@sss.pgh.pa.us

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d038c6c6318b1959640a5a4b0f25cd577ebffbdf

Modified Files
--------------
src/backend/postmaster/pgarch.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)



view thread (7+ messages)

Message-ID: <E1kG5q2-0004dP-Jq@gemulon.postgresql.org>
Permalink:  ../E1kG5q2-0004dP-Jq@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kG5q2-0004dP-Jq@gemulon.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 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: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Make archiver's SIGQUIT handler exit via _exit().
  In-Reply-To: <E1kG5q2-0004dP-Jq@gemulon.postgresql.org>
  References: <E1kG5q2-0004dP-Jq@gemulon.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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox