Re: Unix latch implementation that wakes on postmaster death

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unix latch implementation that wakes on postmaster death
Date: 2011-05-13 14:48:01
Message-ID: 28508.1305298081@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <peter(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2011-05-13 15:09:43 Re: Fw: [BUGS] BUG #6011: Some extra messages are output in the event log at PostgreSQL startup
Previous Message MauMau 2011-05-13 14:02:13 Re: Fw: [BUGS] BUG #6011: Some extra messages are output in the event log at PostgreSQL startup