SET transaction_timeout inside a transaction

Поиск
Список
Период
Сортировка
Искать
От
Quentin de Metz
Тема
SET transaction_timeout inside a transaction
Дата
Msg-id
554670a7-7560-4d18-8ecb-8518fddf2b9d@app.fastmail.com
Список
Дерево обсуждения
SET transaction_timeout inside a transaction "Quentin de Metz" <quentin@de.me.tz>
Re: SET transaction_timeout inside a transaction Bzzzz <lazyvirus@gmx.com>
Re: SET transaction_timeout inside a transaction Tom Lane <tgl@sss.pgh.pa.us>
Re: SET transaction_timeout inside a transaction x4mmm@yandex-team.ru
Re: SET transaction_timeout inside a transaction "Quentin de Metz" <quentin@de.me.tz>
Re: SET transaction_timeout inside a transaction "David G. Johnston" <david.g.johnston@gmail.com>
Hello,

It appears that changing the transaction_timeout when inside a transaction does not work as expected.

Running the following script on master:

SET transaction_timeout = '1s';
BEGIN;
SET transaction_timeout = '3s';
SELECT pg_sleep(2);

Fails with the following:

FATAL:  terminating connection due to transaction timeout
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

A workaround is to "SET transaction_timeout = 0" before each override. But this resets the timer, which may not be aligned with this parameter's intention.

Thank you,
Best regards,

Quentin de Metz



В списке pgsql-novice по дате отправления
От: TIM CHILD
Дата:
От: Tom Lane
Дата:
FAQ