pgsql: Use standard SIGHUP and SIGTERM handlers in walreceiver.

From: Fujii Masao <fujii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use standard SIGHUP and SIGTERM handlers in walreceiver.
Date: 2020-11-12 04:33:18
Message-ID: E1kd4IQ-00081v-A7@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alexander Korotkov 2020-11-12 05:59:31 pgsql: Fix typo in contrib/pg_trgm/pg_trgm--1.4--1.5.sql
Previous Message Alexander Korotkov 2020-11-12 03:42:15 pgsql: Fix name of the macro for getting signature length trgm_gist.c