Re: [BUGS] BUG #14821: idle_in_transaction_session_timeout sometimesgets ignored when statement timeout is pending

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [BUGS] BUG #14821: idle_in_transaction_session_timeout sometimesgets ignored when statement timeout is pending
Дата
Msg-id 20170921012931.zv5pcdlxsvstqzwl@alap3.anarazel.de
обсуждение исходный текст
Ответ на [BUGS] BUG #14821: idle_in_transaction_session_timeout sometimes getsignored when statement timeout is pending  (lukas@fittl.com)
Ответы Re: [BUGS] BUG #14821: idle_in_transaction_session_timeout sometimesgets ignored when statement timeout is pending  (Lukas Fittl <lukas@fittl.com>)
Список pgsql-bugs
Hi,

On 2017-09-21 01:09:56 +0000, lukas@fittl.com wrote:
> It seems to me that ProcessInterrupts() should check for the idle in
> transaction timeout first, since it short-circuits and returns early if
> QueryCancelPending && QueryCancelHoldoffCount != 0 before even getting
> there.

Indeed - although I wonder if the correct fix isn't to move things
around, but to instead avoid the order dependency changing the short
circuit logic so that there's no early return. Like e.g.
if (QueryCancelPending && QueryCancelHoldoffCount != 0){               /* rearm */       }       else if
(QueryCancelPending)      {               /* handle interrupt */       }
 

there's really no good reason for the return right now, and it's bound
to create more bugs in the future.

Greetings,

Andres Freund


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

В списке pgsql-bugs по дате отправления:

Предыдущее
От: lukas@fittl.com
Дата:
Сообщение: [BUGS] BUG #14821: idle_in_transaction_session_timeout sometimes getsignored when statement timeout is pending
Следующее
От: Lukas Fittl
Дата:
Сообщение: Re: [BUGS] BUG #14821: idle_in_transaction_session_timeout sometimesgets ignored when statement timeout is pending