| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Quentin de Metz <quentin(at)de(dot)me(dot)tz> |
| Cc: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>, "amborodin(at)acm(dot)org" <amborodin(at)acm(dot)org>, "aekorotkov(at)gmail(dot)com" <aekorotkov(at)gmail(dot)com>, "japinli(at)hotmail(dot)com" <japinli(at)hotmail(dot)com>, "zhjwpku(at)gmail(dot)com" <zhjwpku(at)gmail(dot)com> |
| Subject: | Re: SET transaction_timeout inside a transaction |
| Date: | 2025-09-19 20:24:18 |
| Message-ID: | CAKFQuwb_0kbQ=nSHE3QXWiemT_eJzoufMdh+9KttXQ8Vbpxq2g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
On Friday, September 19, 2025, Quentin de Metz <quentin(at)de(dot)me(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | x4mmm | 2025-09-20 05:41:01 | Re: SET transaction_timeout inside a transaction |
| Previous Message | Bzzzz | 2025-09-19 20:21:49 | Re: SET transaction_timeout inside a transaction |