From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: race condition in sync rep |
Date: | 2011-03-26 16:21:07 |
Message-ID: | AANLkTikSMJjrtL0mCDeMHRKz8pcADVXUUhuu1xwx-L12@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, Mar 26, 2011 at 3:00 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mar 26, 2011, at 6:16 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> That seems very unlikely even with fsync=off in a real config where we
>> have network path to consider.
>>
>> Your definition of a "nasty" race condition seems off.
>>
>> I've added code for you.
>
> Your skepticism seems out of place. I actually hit this problem in testing. We could debate how realistic my test setup was, but why? It is not our policy - and bad practice in general - to ship code with race conditions. The code you added is not "for me"; it's "to fix a race condition".
A race that will not be lost with normal and sensible settings and
results in a slight performance degradation only in a contrived worse
case scenario. There is no question that it caused any other problem.
> Thanks for the quick fix.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-03-26 16:24:24 | Re: race condition in sync rep |
Previous Message | Simon Riggs | 2011-03-26 16:16:02 | Re: race condition in sync rep |