Re: Hot Standy introduced problem with query cancel behavior

Поиск
Список
Период
Сортировка
От Joachim Wieland
Тема Re: Hot Standy introduced problem with query cancel behavior
Дата
Msg-id dc7b844e1001070848p63eab52bl1d21b86e4249c66c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Hot Standy introduced problem with query cancel behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Testing with concurrent sessions
Следующее
От: Joachim Wieland
Дата:
Сообщение: Re: Hot Standy introduced problem with query cancel behavior