Re: kill -KILL: What happens? - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: kill -KILL: What happens?
Date
Msg-id F339B94C-AF2B-40E6-A9D1-4F6429790806@phlo.org
Whole thread Raw
In response to Re: kill -KILL: What happens?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: kill -KILL: What happens?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Jan13, 2011, at 19:00 , Tom Lane wrote:
> At least on Unix I don't believe there is any other solution.  You
> could try looking at ps output but there's a fundamental race condition,
> ie the postmaster could spawn another child just before you kill it,
> whereupon the child is reassigned to init and there's no longer a good
> way to tell that it came from that postmaster.

Maybe I'm totally confused, but ...

Couldn't normal backends call PostmasterIsAlive and exit if not, just
like the startup process, the stats collector, autovacuum, bgwriter,
walwriter, walreceiver, walsender and the wal archiver already do?

I assumed they do, but now that I grepped the code it seems they don't.

best regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Joel Jacobson
Date:
Subject: Re: Possible bug in pg_settings/pg_depend
Next
From: Joel Jacobson
Date:
Subject: Re: pg_depend explained