summaryrefslogtreecommitdiff
path: root/src/backend/replication
diff options
context:
space:
mode:
authorThomas Munro2023-02-02 21:34:56 +0000
committerThomas Munro2023-02-02 22:29:46 +0000
commitcdf6518ef08ee602b94db4e5ba5887a1d7053c24 (patch)
treed25d1bc430e8a0f670ecd84f04a9dcce78d22615 /src/backend/replication
parente0d70a91a04b942980ab06bc471d2b5b65952459 (diff)
Retire PG_SETMASK() macro.
In the 90s we needed to deal with computers that still had the pre-standard signal masking APIs. That hasn't been relevant for a very long time on Unix systems, and c94ae9d8 got rid of a remaining dependency in our Windows porting code. PG_SETMASK didn't expose save/restore functionality, so we'd already started using sigprocmask() directly in places, creating the visual distraction of having two ways to spell it. It's not part of the API that extensions are expected to be using (but if they are, the change will be trivial). It seems like a good time to drop the old macro and just call the standard POSIX function. Reviewed-by: Nathan Bossart <nathandbossart@gmail.com> Discussion: https://postgr.es/m/CA%2BhUKG%2BKfQgrhHP2DLTohX1WwubaCBHmTzGnAEDPZ-Gug-Xskg%40mail.gmail.com
Diffstat (limited to 'src/backend/replication')
-rw-r--r--src/backend/replication/walreceiver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c
index b0cfddd5481..f6446da2d6d 100644
--- a/src/backend/replication/walreceiver.c
+++ b/src/backend/replication/walreceiver.c
@@ -293,7 +293,7 @@ WalReceiverMain(void)
elog(ERROR, "libpqwalreceiver didn't initialize correctly");
/* Unblock signals (they were blocked when the postmaster forked us) */
- PG_SETMASK(&UnBlockSig);
+ sigprocmask(SIG_SETMASK, &UnBlockSig, NULL);
/* Establish the connection to the primary for XLOG streaming */
wrconn = walrcv_connect(conninfo, false,