On Tue, Jan 11, 2011 at 7:24 AM, Magnus Hagander <mag...@hagander.net> wrote:
>> No, do this at top
>>
>> if (walsnd->state == state)
>>  return;
>>
>> Keep spinlocks when actually setting it.

I think this is safe...

> Aha. Thanks for the pointers, pfa a new version.

...but I think you also need to take the spinlock when reading the value.

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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to