Retire PG_SETMASK() macro.
authorThomas Munro <tmunro@postgresql.org>
Thu, 2 Feb 2023 21:34:56 +0000 (10:34 +1300)
committerThomas Munro <tmunro@postgresql.org>
Thu, 2 Feb 2023 22:29:46 +0000 (11:29 +1300)
commitcdf6518ef08ee602b94db4e5ba5887a1d7053c24
treed25d1bc430e8a0f670ecd84f04a9dcce78d22615
parente0d70a91a04b942980ab06bc471d2b5b65952459
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
14 files changed:
src/backend/access/transam/xact.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgworker.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/checkpointer.c
src/backend/postmaster/pgarch.c
src/backend/postmaster/postmaster.c
src/backend/postmaster/startup.c
src/backend/postmaster/syslogger.c
src/backend/postmaster/walwriter.c
src/backend/replication/walreceiver.c
src/backend/tcop/postgres.c
src/backend/utils/init/miscinit.c
src/include/libpq/pqsignal.h