Re: Process wakeups when idle and power consumption - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Process wakeups when idle and power consumption
Date
Msg-id BANLkTi=ZygkqPvaFoDJcT8M6Bh9cB2MTAw@mail.gmail.com
Whole thread Raw
In response to Re: Process wakeups when idle and power consumption  (Peter Geoghegan <peter@2ndquadrant.com>)
Responses Re: Process wakeups when idle and power consumption  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Tue, May 10, 2011 at 5:14 AM, Peter Geoghegan <peter@2ndquadrant.com> wrote:
> On 10 May 2011 09:45, Heikki Linnakangas
> <heikki.linnakangas@enterprisedb.com> wrote:
>
>> I think we need to refactor the function into something like:
>>
>> #define WL_LATCH_SET    1
>> #define WL_SOCKET_READABLE 2
>> #define WL_SOCKET_WRITEABLE 4
>> #define WL_TIMEOUT      8
>> #define WL_POSTMASTER_DEATH 16
>
> While I agree with the need to not box ourselves into a corner on the
> latch interface by making sweeping assumptions, isn't the fact that a
> socket became readable or writable strictly an implementation detail?

The thing about the socket being readable/writeable is needed for
walsender.  It needs to notice when its connection to walreceiver is
writeable (so it can send more WAL) or readable (so it can receive a
reply message).

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Process wakeups when idle and power consumption
Next
From: Robert Haas
Date:
Subject: Re: switch UNLOGGED to LOGGED