Re: Process wakeups when idle and power consumption
От | Heikki Linnakangas |
---|---|
Тема | Re: Process wakeups when idle and power consumption |
Дата | |
Msg-id | 4DC7BFAB.3050807@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Process wakeups when idle and power consumption (Peter Geoghegan <peter@2ndquadrant.com>) |
Ответы |
Re: Process wakeups when idle and power consumption
Re: Process wakeups when idle and power consumption |
Список | 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
В списке pgsql-hackers по дате отправления: