Re: Transaction timeout

邱宇航 <iamqyh@gmail.com>

From: 邱宇航 <iamqyh@gmail.com>
To: "Andrey M. Borodin" <x4mmm@yandex-team.ru>
Cc: Japin Li <japinli@hotmail.com>, Fujii Masao <masao.fujii@oss.nttdata.com>, Andrey Borodin <amborodin86@gmail.com>, Andres Freund <andres@anarazel.de>, Michael Paquier <michael.paquier@gmail.com>, Nikolay Samokhvalov <samokhvalov@gmail.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-12-07T10:39:55Z
Lists: pgsql-hackers
Hi,

I read the V6 patch and found something needs to be improved.

Prepared transactions should also be documented.
         A value of zero (the default) disables the timeout.
+        This timeout is not applied to prepared transactions. Only transactions
+        with user connections are affected.

Missing 'time'.
-                       gettext_noop("Sets the maximum allowed in a transaction."),
+                       gettext_noop("Sets the maximum allowed time in a transaction."),

16 is already released. It's 17 now.
-       if (AH->remoteVersion >= 160000)
+       if (AH->remoteVersion >= 170000)
                ExecuteSqlStatement(AH, "SET transaction_timeout = 0");

And I test the V6 patch and it works as expected.

--
Yuhang Qiu

Commits

  1. Add TAP tests for timeouts

  2. Remove flaky isolation tests for timeouts

  3. Followup fixes for transaction_timeout

  4. Introduce transaction_timeout

  5. On systems that have setsid(2) (which should be just about everything except