Re: Sync Rep v17 - Mailing list pgsql-hackers

From Marti Raudsepp
Subject Re: Sync Rep v17
Date
Msg-id AANLkTimsfNE2H4xaY6cwiyp5i7JDMwpx3ZZTucYp=KT-@mail.gmail.com
Whole thread Raw
In response to Re: Sync Rep v17  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Sync Rep v17  (Andres Freund <andres@anarazel.de>)
Re: Sync Rep v17  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Feb 22, 2011 at 07:38, Fujii Masao <masao.fujii@gmail.com> wrote:
> +       SpinLockAcquire(&WalSndCtl->ctlmutex);
> +       result = WalSndCtl->sync_rep_service_available;
> +       SpinLockRelease(&WalSndCtl->ctlmutex);

> volatile pointer needs to be used to prevent code rearrangement.

I don't think that's necessary. Spinlock functions already prevent
reordering using __asm__ __volatile__

Otherwise, surely they would be utterly broken?

Regards,
Marti


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Snapshot synchronization, again...
Next
From: Cédric Villemain
Date:
Subject: Re: UNLOGGED tables in psql \d