Re: Process wakeups when idle and power consumption

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Process wakeups when idle and power consumption
Дата
Msg-id 4DCA67FD.5060102@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Process wakeups when idle and power consumption  (Peter Geoghegan <peter@2ndquadrant.com>)
Список pgsql-hackers
On 11.05.2011 13:34, Peter Geoghegan wrote:
> On 11 May 2011 09:54, Magnus Hagander<magnus@hagander.net>  wrote:
>
>> If you're doing this Win32 specific, take a look at
>> src/backend/port/win32/signal.c for an example.
>>
>> If you're not doing this win32-specific, I doubt we really want
>> threads to be involved...
>
> Well, that seems to be the traditional wisdom. It seems sensible to me
> that each process should look out for postmaster death itself though.
> Tom described potential race conditions in looking at ps output...do
> we really want to double the number of auxiliary processes in a single
> release of Postgres?

Uh, no you don't want any new processes on Unix. You want each process 
to check for postmaster death every once in a while, like they do today. 
The pipe-trick is to make sure the processes wake up promptly to notice 
the death when the postmaster dies. You just need to add the 
postmaster-pipe to the select() calls we already do.

I'm not sure if on Windows you can similarly just add to the 
postmaster-pipe to the WaitForMultipleObjects() calls we already do. 
Then you won't need new threads on Windows either.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Process wakeups when idle and power consumption
Следующее
От: Robert Haas
Дата:
Сообщение: Re: the big picture for index-only scans