pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use standard SIGHUP and SIGTERM handlers in walreceiver.
Date: Thu, 12 Nov 2020 04:33:18 +0000
Message-ID: <E1kd4IQ-00081v-A7@gemulon.postgresql.org> (raw)

Use standard SIGHUP and SIGTERM handlers in walreceiver.

Commit 1e53fe0e70 changed background processes so that they use
standard SIGHUP handler. Like that, this commit makes walreceiver
use standard SIGHUP and SIGTERM handlers, to simplify the code.

As the side effect of this commit, walreceiver can wake up and process
the configuration files promptly when receiving SIGHUP. Because the
standard SIGHUP handler sets the latch. On the other hand, previously
there could be a time lag between the receipt of SIGHUP and
the process of configuration files since the dedicated handler didn't
set the latch.

Author: Bharath Rupireddy, tweaked by Fujii Masao
Reviewed-by: Kyotaro Horiguchi, Fujii Masao
Discussion: https://postgr.es/m/CALj2ACXPorUqePswDtOeM_s82v9RW32E1fYmOPZ5NuE+TWKj_A@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1a2ae7c50fb4ab17a8d38e755fc871ebc3a5845d

Modified Files
--------------
src/backend/replication/walreceiver.c | 53 +++++++----------------------------
1 file changed, 10 insertions(+), 43 deletions(-)



Message-ID: <E1kd4IQ-00081v-A7@gemulon.postgresql.org>
Permalink:  ../E1kd4IQ-00081v-A7@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kd4IQ-00081v-A7@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: fujii@postgresql.org
  Subject: Re: pgsql: Use standard SIGHUP and SIGTERM handlers in walreceiver.
  In-Reply-To: <E1kd4IQ-00081v-A7@gemulon.postgresql.org>
  References: <E1kd4IQ-00081v-A7@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