Use signals for postmaster death on Linux.

Thomas Munro <tmunro@postgresql.org>

Commit: 9f09529952ac41a10e5874cba745c1c24e67ac79
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2018-07-11T00:47:06Z
Releases: 12.0
Use signals for postmaster death on Linux.

Linux provides a way to ask for a signal when your parent process dies.
Use that to make PostmasterIsAlive() very cheap.

Based on a suggestion from Andres Freund.

Author: Thomas Munro, Heikki Linnakangas
Reviewed-By: Michael Paquier
Discussion: https://postgr.es/m/7261eb39-0369-f2f4-1bb5-62f3b6083b5e%40iki.fi
Discussion: https://postgr.es/m/20180411002643.6buofht4ranhei7k%40alap3.anarazel.de

Files

PathChange+/−
configure modified +1 −1
configure.in modified +1 −1
src/backend/storage/ipc/latch.c modified +3 −3
src/backend/storage/ipc/pmsignal.c modified +112 −13
src/backend/utils/init/miscinit.c modified +4 −0
src/include/pg_config.h.in modified +3 −0
src/include/pg_config.h.win32 modified +3 −0
src/include/storage/pmsignal.h modified +32 −1

Discussion