pgsql: Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplif - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplif
Date
Msg-id E1SSYCf-00060m-LU@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplif
List pgsql-committers
Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplify callers.

Per a suggestion from Peter Geoghegan, make WaitLatch responsible for
verifying that the WL_POSTMASTER_DEATH bit it returns is truthful (by
testing PostmasterIsAlive).  Then simplify its callers, who no longer
need to do that for themselves.  Remove weasel wording about falsely-set
result bits from WaitLatch's API contract.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/f40022f1adaeff85b01d98fea38cf5aa16814aa7

Modified Files
--------------
src/backend/port/unix_latch.c         |   35 ++++++++++++++++++++++----------
src/backend/port/win32_latch.c        |   12 +++++++++-
src/backend/postmaster/autovacuum.c   |    9 ++++---
src/backend/postmaster/bgwriter.c     |    7 +----
src/backend/postmaster/checkpointer.c |    7 +----
src/backend/postmaster/pgstat.c       |    7 +----
src/backend/postmaster/walwriter.c    |    7 +----
7 files changed, 47 insertions(+), 37 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgsql: Remove unportable use of SGML character-code entity.
Next
From: Bruce Momjian
Date:
Subject: pgsql: Merge visibility map crash-safety into index-only scan release n