Re: SET transaction_timeout inside a transaction - Mailing list pgsql-novice

From David G. Johnston
Subject Re: SET transaction_timeout inside a transaction
Date
Msg-id CAKFQuwb_0kbQ=nSHE3QXWiemT_eJzoufMdh+9KttXQ8Vbpxq2g@mail.gmail.com
Whole thread Raw
In response to SET transaction_timeout inside a transaction  ("Quentin de Metz" <quentin@de.me.tz>)
List 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 by date:

Previous
From: Bzzzz
Date:
Subject: Re: SET transaction_timeout inside a transaction
Next
From: x4mmm@yandex-team.ru
Date:
Subject: Re: SET transaction_timeout inside a transaction