| From: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
| Cc: | Jingtang Zhang <mrdrivingduck(at)gmail(dot)com>, pgsql-hackers mailing list <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, 邱宇航 <iamqyh(at)gmail(dot)com> |
| Subject: | Re: transaction_timeout is not enforced during ClientWrite |
| Date: | 2026-11-15 13:13:07 |
| Message-ID: | 307E0558-D4F9-4BC7-98CF-FFCA942F9123@yandex-team.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Jingtang,
There is a similar case on the read side. In psql:
CREATE TABLE tt_copy_wait (v text);
BEGIN;
SET LOCAL transaction_timeout = '2s';
COPY tt_copy_wait FROM STDIN;
Leave COPY waiting for input for more than 2s. In my run,
pg_stat_activity still showed active ClientRead.
Entering \. then produced:
FATAL: terminating connection due to transaction timeout
During COPY input, DoingCommandRead is false. The read-wait path in
ProcessClientReadInterrupt() then handles ProcDiePending, but not
TransactionTimeoutPending. Could the fix cover this path too?
I've posted draft fixes for other transaction_timeout issues [0], but
this ClientRead case is independent. Just linking these threads together.
Thank you!
Best regards, Andrey Borodin.
[0] https://postgr.es/m/87676E9A-DCA9-46AE-9214-5C374D5832F3%40yandex-team.ru
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Alexandre Felipe | 2026-11-15 12:32:17 | Re: pg_regress: schedule multi-line test groups |