Re: Hot Standy introduced problem with query cancel behavior

From: Joachim Wieland <joe(at)mcknight(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Kris Jurka <books(at)ejurka(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Subject: Re: Hot Standy introduced problem with query cancel behavior
Date: 2010-01-07 16:48:02
Message-ID: dc7b844e1001070848p63eab52bl1d21b86e4249c66c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 7, 2010 at 4:23 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Joachim Wieland <joe(at)mcknight(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joachim Wieland 2010-01-07 16:50:00 Re: Hot Standy introduced problem with query cancel behavior
Previous Message Andrew Dunstan 2010-01-07 16:46:53 Re: Testing with concurrent sessions