Re: Transaction timeout

From: Junwang Zhao <zhjwpku(at)gmail(dot)com>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>
Cc: Li Japin <japinli(at)hotmail(dot)com>, 邱宇航 <iamqyh(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Andrey Borodin <amborodin86(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Nikolay Samokhvalov <samokhvalov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Transaction timeout
Date: 2023-12-29 11:00:10
Message-ID: CAEG8a3J6mSPXgHq_aqC7yk4xq1e9XF9B1Q+QVBr48fzdw1uKqw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 29, 2023 at 6:00 PM Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru> wrote:
>
>
>
> > On 28 Dec 2023, at 21:02, Junwang Zhao <zhjwpku(at)gmail(dot)com> wrote:
> >
> > Seems V5~V17 doesn't work as expected for Nikolay's case:
> >
>
> Yeah, that's a problem.
> > So I propose the following change, what do you think?
> This breaks COMMIT AND CHAIN.
>
> PFA v18: I've added a test for Nik's case and for COMMIT AND CHAIN. Now we need to fix stuff to pass this tests (I've crafted output).
> We also need test for patchset step "Try to enable transaction_timeout before next command".
>
> Thanks!

After exploring the code, I found scheduling the timeout in
`StartTransaction` might be a reasonable idea, all the chain
commands will call this function.

What concerns me is that it is also called by StartParallelWorkerTransaction,
I'm not sure if we should enable this timeout for parallel execution.

Thought?

>
>
> Best regards, Andrey Borodin.

--
Regards
Junwang Zhao

Attachment Content-Type Size
v19-0002-Use-test-from-Li-Japin-Also-add-tests-for-multip.patch application/octet-stream 8.9 KB
v19-0003-Try-to-enable-transaction_timeout-before-next-co.patch application/octet-stream 1.4 KB
v19-0001-Introduce-transaction_timeout.patch application/octet-stream 19.8 KB
v19-0004-fix-reschedule-timeout-for-each-commmand.patch application/octet-stream 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey M. Borodin 2023-12-29 11:15:00 Re: Transaction timeout
Previous Message Alexander Lakhin 2023-12-29 11:00:01 Re: Removing unneeded self joins