Re: BUG #17303: statement_timeout does not work always

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17303: statement_timeout does not work always
Дата
Msg-id 1216509.1638197595@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17303: statement_timeout does not work always  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #17303: statement_timeout does not work always  (RekGRpth <rekgrpth@gmail.com>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> in postgres 10.19
> psql -c "SET statement_timeout = 1000;select pg_sleep(2);"
>  pg_sleep 
> ----------
 
> (1 row)

> Why statement_timeout does not work always in postgres 10.19?

When you use -c that way, the two statements are sent as a single Query
message.  PG versions before 11 interpreted the timeout as taking effect
beginning with the next Query message.  11 and later define it
differently.  There's no bug here, or at least nothing we're going to change.

A workaround you could use in older versions is to use two separate -c
switches (although you need a 9.6 or later psql for that).

            regards, tom lane



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

Предыдущее
От: "Poot, Bas (B.J.)"
Дата:
Сообщение: subselect removes rows
Следующее
От: Tom Lane
Дата:
Сообщение: Re: subselect removes rows