Re: Unix latch implementation that wakes on postmaster death
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <peter@2ndquadrant.com>
Cc: PG Hackers <pgsql-hackers@postgresql.org>
Date: 2011-05-13T14:48:01Z
Lists: pgsql-hackers
Peter Geoghegan <peter@2ndquadrant.com> writes: > Attached is a patch that builds upon Florian Pflug's earlier proof of > concept program for monitoring the postmaster. Cool. Like Robert, no time to review this in detail now, but ... > How should I be handling the EXEC_BACKEND case? Assuming that the open pipe descriptor is inherited across exec on Windows (and if it's not, we're back to square one) all you should have to do is get the pipe descriptor variables passed down to the child processes. There's some grotty code in postmaster.c that's used for this purpose --- see struct BackendParameters and associated functions. Just add some code there to pass down the values. I'm not that thrilled with the "life sign" terminology, but don't have a better idea right offhand. regards, tom lane