Re: Synchronization primitives (Was: Re: An example of bugs for Hot Standby) - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Synchronization primitives (Was: Re: An example of bugs for Hot Standby)
Date
Msg-id 4B575809.7000106@enterprisedb.com
Whole thread Raw
In response to Re: Synchronization primitives (Was: Re: An example of bugs for Hot Standby)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Synchronization primitives (Was: Re: An example of bugs for Hot Standby)  (David Fetter <david@fetter.org>)
List pgsql-hackers
Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> My point is that we should replace such polling loops with something
>> non-polling, using wait/signal or semaphores or something. That gets
>> quite a bit more complex. You'd probably still have the loop, but
>> instead of pg_usleep() you'd call some new primitive function that waits
>> until the shared variable changes.
> 
> Maybe someday --- it's certainly not something we need to mess with for
> 8.5.  As Simon comments, getting it to work nicely in the face of corner
> cases (like processes dying unexpectedly) could be a lot of work.

Agreed, polling is good enough for 8.5.

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


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [NOVICE] Python verison for build in config.pl (Win32)
Next
From: Tom Lane
Date:
Subject: Re: [NOVICE] Python verison for build in config.pl (Win32)