Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-10-16 Thread Robert Haas
On Thu, Oct 15, 2015 at 10:36 PM, Michael Paquier wrote: > On Fri, Oct 16, 2015 at 9:07 AM, Thomas Munro > wrote: >> On Wed, Oct 7, 2015 at 8:52 AM, Robert Haas wrote: >>> On Thu, Oct 1, 2015 at 11:01 PM, Michael

Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-10-16 Thread Michael Paquier
On Sat, Oct 17, 2015 at 3:21 AM, Robert Haas wrote: > OK, committed his, and yours. > > I back-patched his spin.h comment fix to 9.5 since that's a factual > error, but the rest of this seems like optimization so I committed it > only to master. That sounds right. Thanks! -- Michael -- Sent

Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-10-15 Thread Michael Paquier
On Fri, Oct 16, 2015 at 9:07 AM, Thomas Munro wrote: > On Wed, Oct 7, 2015 at 8:52 AM, Robert Haas wrote: >> On Thu, Oct 1, 2015 at 11:01 PM, Michael Paquier >> wrote: Right, see attached. >>> >>> It seems to

Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-10-15 Thread Thomas Munro
On Wed, Oct 7, 2015 at 8:52 AM, Robert Haas wrote: > On Thu, Oct 1, 2015 at 11:01 PM, Michael Paquier > wrote: >>> Right, see attached. >> >> It seems to me that we could as well simplify checkpoint.c and >> logical.c. In those files volatile

Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-10-06 Thread Robert Haas
On Thu, Oct 1, 2015 at 11:01 PM, Michael Paquier wrote: >> Right, see attached. > > It seems to me that we could as well simplify checkpoint.c and > logical.c. In those files volatile casts are used as well to protect > from reordering for spinlock operations. See for

Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-10-01 Thread Michael Paquier
On Tue, Sep 22, 2015 at 7:25 AM, Thomas Munro wrote: > On Tue, Sep 22, 2015 at 8:19 AM, Alvaro Herrera > wrote: >> Thomas Munro wrote: >> >>> In walsender.c, walreceiver.c, walreceiverfuncs.c there are several >>> places where volatile

Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-09-22 Thread Andres Freund
Hi, On 2015-09-17 16:32:17 +1200, Thomas Munro wrote: > In walsender.c, walreceiver.c, walreceiverfuncs.c there are several > places where volatile qualifiers are used apparently only to prevent > reordering around spinlock operations. My understanding is that if > potential load/store

Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-09-21 Thread Thomas Munro
On Tue, Sep 22, 2015 at 8:19 AM, Alvaro Herrera wrote: > Thomas Munro wrote: > >> In walsender.c, walreceiver.c, walreceiverfuncs.c there are several >> places where volatile qualifiers are used apparently only to prevent >> reordering around spinlock operations. > > In

Re: [HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-09-21 Thread Alvaro Herrera
Thomas Munro wrote: > In walsender.c, walreceiver.c, walreceiverfuncs.c there are several > places where volatile qualifiers are used apparently only to prevent > reordering around spinlock operations. In replication/slot.c there are a number of places (12, I think) that introduce a block

[HACKERS] Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c?

2015-09-16 Thread Thomas Munro
Hi In walsender.c, walreceiver.c, walreceiverfuncs.c there are several places where volatile qualifiers are used apparently only to prevent reordering around spinlock operations. My understanding is that if potential load/store reordering around spinlock operations is the only reason for using