Make WaitLatch's WL_POSTMASTER_DEATH result trustworthy; simplify callers.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 May 2012 18:34:22 +0000 (14:34 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 10 May 2012 18:34:53 +0000 (14:34 -0400)
commitf40022f1adaeff85b01d98fea38cf5aa16814aa7
tree3a5337271306c5df48a23df0e8abc6729c771e92
parent586d356bc5af1aa61f965f6ba1cbeb1533ec8c99
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.
src/backend/port/unix_latch.c
src/backend/port/win32_latch.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgwriter.c
src/backend/postmaster/checkpointer.c
src/backend/postmaster/pgstat.c
src/backend/postmaster/walwriter.c