Re: Transaction timeout
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Andrey Borodin <amborodin86@gmail.com>,
Nathan Bossart <nathandbossart@gmail.com>
Cc: Andres Freund <andres@anarazel.de>,
Michael Paquier <michael.paquier@gmail.com>,
Nikolay Samokhvalov <samokhvalov@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-09-01T20:23:07Z
Lists: pgsql-hackers
On 12.01.23 20:46, Andrey Borodin wrote:
>> On Sun, Dec 18, 2022 at 12:53:31PM -0800, Andrey Borodin wrote:
>>> I've rewritten this part to correctly report all timeouts that did
>>> happen. However there's now a tricky comma-formatting code which was
>>> tested only manually.
>> I suspect this will make translation difficult.
> I use special functions for this like _()
>
> char* lock_reason = lock_timeout_occurred ? _("lock timeout") : "";
>
> and then
> ereport(ERROR, (errcode(err_code),
> errmsg("canceling statement due to %s%s%s%s%s", lock_reason, comma1,
> stmt_reason, comma2, tx_reason)));
>
> I hope it will be translatable...
No, you can't do that. You have to write out all the strings separately.
Commits
-
Add TAP tests for timeouts
- eeefd4280f6e 17.0 landed
-
Remove flaky isolation tests for timeouts
- a661bf7b0f56 17.0 landed
-
Followup fixes for transaction_timeout
- bf82f43790a6 17.0 landed
-
Introduce transaction_timeout
- 51efe38cb92f 17.0 landed
-
On systems that have setsid(2) (which should be just about everything except
- 3ad0728c817b 8.2.0 cited