pgsql: Use signals for postmaster death on Linux.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use signals for postmaster death on Linux.
Date: 2018-07-11 01:14:52
Message-ID: E1fd3iW-0002W6-22@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9f09529952ac41a10e5874cba745c1c24e67ac79

Modified Files
--------------
configure | 2 +-
configure.in | 2 +-
src/backend/storage/ipc/latch.c | 6 +-
src/backend/storage/ipc/pmsignal.c | 125 +++++++++++++++++++++++++++++++++----
src/backend/utils/init/miscinit.c | 4 ++
src/include/pg_config.h.in | 3 +
src/include/pg_config.h.win32 | 3 +
src/include/storage/pmsignal.h | 33 +++++++++-
8 files changed, 159 insertions(+), 19 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2018-07-11 04:14:04 Re: Tips on committing
Previous Message Michael Paquier 2018-07-11 00:13:53 pgsql: Block replication slot advance for these not yet reserving WAL