On 09.05.2011 12:20, Peter Geoghegan wrote:
I've taken a look into it, and I'm not optimistic about the likelihood
of the way I've suggested that we can register a callback on process
termination on windows being acceptable. It seems to be a kludge too
far. It does work on Vista, just not very well. There is a
considerable delay on closing the above console application that uses
this technique, for example, and there seems to be an unpredictable
delay in the callback occurring.

Can't we use the pipe trick on Windows? The API is different, but we use pipes on Windows for other things already. When a process is launched, open a pipe between postmaster and the child process. In the child, spawn a thread that just calls ReadFile() on the pipe, which blocks. If postmaster dies, the ReadFile() call will return with an error.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to