Re: Hot Standy introduced problem with query cancel behavior - Mailing list pgsql-hackers

From Joachim Wieland
Subject Re: Hot Standy introduced problem with query cancel behavior
Date
Msg-id dc7b844e1001070848p63eab52bl1d21b86e4249c66c@mail.gmail.com
Whole thread Raw
In response to Re: Hot Standy introduced problem with query cancel behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Jan 7, 2010 at 4:23 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Joachim Wieland <joe@mcknight.de> writes:
>> As there were so many boolean SomethingCancelPending variables I changed them
>> to be bitmasks and merged all of them into a single variable.
>
> This seems like a truly horrid idea, because those variables are set by
> signal handlers.  A bitmask cannot be manipulated atomically, so you
> have almost certainly introduced race-condition bugs.

True... However there are just a few places where the patch uses
bitmasks for modification of the variable. As Simon seems to be
working on this currently anyway, I'll leave it to him to either keep
the 5 boolean variables or do some mutual exclusion as in
HandleNotifyInterrupt() (or do something completely different).


Joachim


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Testing with concurrent sessions
Next
From: Joachim Wieland
Date:
Subject: Re: Hot Standy introduced problem with query cancel behavior