• Thomas Munro's avatar
    Handle EACCES errors from kevent() better. · 70516a17
    Thomas Munro authored
    While registering for postmaster exit events, we have to handle a couple
    of edge cases where the postmaster is already gone.  Commit 815c2f09
    missed one: EACCES must surely imply that PostmasterPid no longer
    belongs to our postmaster process (or alternatively an unexpected
    permissions model has been imposed on us).  Like ESRCH, this should be
    treated as a WL_POSTMASTER_DEATH event, rather than being raised with
    ereport().
    
    No known problems reported in the wild.  Per code review from Tom Lane.
    Back-patch to 13.
    Reported-by: default avatarTom Lane <tgl@sss.pgh.pa.us>
    Discussion: https://postgr.es/m/3624029.1602701929%40sss.pgh.pa.us
    70516a17
latch.c 56.8 KB