From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
Cc: | Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Small issues in syncrep.c |
Date: | 2016-08-10 07:29:43 |
Message-ID: | CANP8+jLqWwawUij7MV-ZT9+-LEAyRnHJ_6zTZE+w0Oeqw2rOEQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 10 August 2016 at 06:24, Michael Paquier <michael(dot)paquier(at)gmail(dot)com> wrote:
> On Tue, Aug 9, 2016 at 5:34 PM, Julien Rouhaud
> <julien(dot)rouhaud(at)dalibo(dot)com> wrote:
>> Since 14e8803f1, it's not necessary to acquire the SyncRepLock to see up
>> to date data. But it looks like this commit didn't update all the
>> comment around MyProc->syncRepState, which still mention retrieving the
>> value without and without lock. Also, there's I think a now unneeded
>> test to try to retrieve again syncRepState.
>>
>> Patch attached to fix both small issues, present since 9.5.
>
> You could directly check MyProc->syncRepState and remove syncRepState.
> Could you add it to the next commit fest? I don't think this will get
> into 9.6 as this is an optimization.
Good catch.
I've updated Julien's patch to reflect Michael's suggestion.
Looks good to apply immediately.
14e8803f1 was only a partial patch for the syncrep code, so I don't
see any reason to keep the code as it currently is in 9.5/9.6.
Any objections to backpatching this to 9.5 and 9.6?
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
fix_syncrep.v2.diff | text/plain | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-08-10 07:43:52 | Re: Small issues in syncrep.c |
Previous Message | Victor Wagner | 2016-08-10 06:50:46 | Re: handling unconvertible error messages |