On Tue, Jan 11, 2011 at 7:24 AM, Magnus Hagander <magnus(at)hagander(dot)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