From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Use standard die() signal handler in walreceiver |
Date: | 2025-04-04 09:58:01 |
Message-ID: | E1u0doH-002bqy-00@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Use standard die() signal handler in walreceiver
This gets rid of the bespoken ProcessWalRcvInterrupts() function,
which lets walreceiver terminate at any CHECK_FOR_INTERRUPTS() call.
And it's less code anyway.
We can now use the standard libpqsrv_connect_params() libpq wrapper
from libpq-be-fe-helpers.h, removing more code. We attempted to do
that earlier already in commit 728f86fec6, but that was reverted
because it didn't call ProcessWalRcvInterrupts() and therefore didn't
react to shutdown requests. Now that ProcessWalRcvInterrupts() is
gone, it works. As stated in that commit, this also leads to
libpqwalreceiver reserving file descriptors for libpq conncetions,
which is nice.
Author: Andres Freund <andres(at)anarazel(dot)de> (the earlier commit)
Author: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Reviewed-by: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Reviewed-by: Yura Sokolov <y(dot)sokolov(at)postgrespro(dot)ru>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6e9c81836e101bc7f37ddc5e2f6ab58d62efcb24
Modified Files
--------------
.../libpqwalreceiver/libpqwalreceiver.c | 208 +++++----------------
src/backend/replication/walreceiver.c | 41 +---
src/backend/tcop/postgres.c | 4 +
src/include/replication/walreceiver.h | 1 -
4 files changed, 51 insertions(+), 203 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2025-04-04 10:04:31 | pgsql: Extend ALTER DEFAULT PRIVILEGES to define default privileges for |
Previous Message | Peter Eisentraut | 2025-04-04 09:32:01 | pgsql: Convert PathKey to use CompareType |