Re: Process wakeups when idle and power consumption

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Peter Geoghegan <peter(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Process wakeups when idle and power consumption
Date: 2011-05-09 10:19:23
Message-ID: 4DC7BFAB.3050807@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kohei Kaigai 2011-05-09 10:23:31 [v9.2] SECURITY LABEL on shared database object
Previous Message Yves Weißig 2011-05-09 10:09:04 Re: could not write block & xlog flush request 3FD/0 is not satisfied