pgsql: Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplif

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplif
Date: 2012-05-10 18:35:05
Message-ID: E1SSYCf-00060m-LU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2012-05-10 20:50:49 pgsql: Merge visibility map crash-safety into index-only scan release n
Previous Message Alvaro Herrera 2012-05-10 18:09:25 Re: pgsql: Remove unportable use of SGML character-code entity.