pgsql: Make the standby server promptly handle interrupt signals. - Mailing list pgsql-committers

From Fujii Masao
Subject pgsql: Make the standby server promptly handle interrupt signals.
Date
Msg-id E1m7ThZ-0006hM-2R@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Make the standby server promptly handle interrupt signals.

This commit changes the startup process in the standby server so that
it handles the interrupt signals after waiting for wal_retrieve_retry_interval
on the latch and resetting it, before entering another wait on the latch.
This change causes the standby server to promptly handle interrupt signals.

Otherwise, previously, there was the case where the standby needs to
wait extra five seconds to shutdown when the shutdown request arrived
while the startup process was waiting for wal_retrieve_retry_interval
on the latch.

Author: Fujii Masao, but implementation idea is from Soumyadeep Chakraborty
Reviewed-by: Soumyadeep Chakraborty
Discussion: https://postgr.es/m/9d7e6ab0-8a53-ddb9-63cd-289bcb25fe0e@oss.nttdata.com

Per discussion of BUG #17073, back-patch to all supported versions.
Discussion: https://postgr.es/m/17073-1a5fdaed0fa5d4d0@postgresql.org

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8e5be9cfe70e2b7042c7e29f859a05abad57d5e1

Modified Files
--------------
src/backend/access/transam/xlog.c | 3 +++
1 file changed, 3 insertions(+)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix check for conflicting session- vs transaction-level locks.
Next
From: Fujii Masao
Date:
Subject: pgsql: Make the standby server promptly handle interrupt signals.