Re: kill -KILL: What happens?
Florian G. Pflug <fgp@phlo.org>
From: Florian Pflug <fgp@phlo.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Fetter <david@fetter.org>, PG Hackers <pgsql-hackers@postgresql.org>
Date: 2011-01-13T19:04:12Z
Lists: 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