Re: SET transaction_timeout inside a transaction

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: SET transaction_timeout inside a transaction
Дата
Msg-id CAKFQuwb_0kbQ=nSHE3QXWiemT_eJzoufMdh+9KttXQ8Vbpxq2g@mail.gmail.com
обсуждение исходный текст
Ответ на SET transaction_timeout inside a transaction  ("Quentin de Metz" <quentin@de.me.tz>)
Список pgsql-novice
On Friday, September 19, 2025, Quentin de Metz <quentin@de.me.tz> wrote:

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);

It’s seems perfectly reasonable that as soon as a transaction begins it sets up a timer using the then-current value of transaction_timeout.  And that changing the variable doesn’t affect any already established timers.

David J.

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