From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Obsolete use of volatile in walsender.c, walreceiver.c, walreceiverfuncs.c? |
Date: | 2015-09-21 22:25:51 |
Message-ID: | CAEepm=2ajhe3uN7BoxX-fons0y3gw+BJWOS=ue7J0Gocu-=OQQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 22, 2015 at 8:19 AM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> 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 replication/slot.c there are a number of places (12, I think) that
> introduce a block specifically to contain a volatile cast on a variable
> for spinlock-protected access. We could remove the whole thing and save
> at least 3 lines and one indentation level for each of them.
Right, see attached.
--
Thomas Munro
http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
replication-strip-volatile-v2.patch | application/octet-stream | 13.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2015-09-22 02:59:38 | pgsql: Use gender-neutral language in documentation |
Previous Message | Thom Brown | 2015-09-21 22:11:54 | Re: jsonb_set array append hack? |