Re: Transaction timeout

From: Junwang Zhao <zhjwpku(at)gmail(dot)com>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, 邱宇航 <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
Subject: Re: Transaction timeout
Date: 2023-12-22 15:30:56
Message-ID: CAEG8a3K8kD0mQDFzj=v0zV7h+m4J4TDBLkXSJJS3+VGWNvnDCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 22, 2023 at 10:44 PM Japin Li <japinli(at)hotmail(dot)com> wrote:
>
>
> On Fri, 22 Dec 2023 at 22:37, Junwang Zhao <zhjwpku(at)gmail(dot)com> wrote:
> > On Fri, Dec 22, 2023 at 10:25 PM Japin Li <japinli(at)hotmail(dot)com> wrote:
> >> I try to set idle_in_transaction_session_timeout after begin transaction,
> >> it changes immediately, so I think transaction_timeout should also be take
> >> immediately.
> >
> > Ah, right, idle_in_transaction_session_timeout is set after the set
> > command finishes and before the backend send *ready for query*
> > to the client, so the value of the GUC is already set before
> > next command.
> >
>
> I mean, is it possible to set transaction_timeout before next comand?
>
Yeah, it's possible, set transaction_timeout in the when it first
goes into *idle in transaction* mode, see the attached files.

>
> --
> Regrads,
> Japin Li
> ChengDu WenWu Information Technology Co., Ltd.

--
Regards
Junwang Zhao

Attachment Content-Type Size
v15-0001-Introduce-transaction_timeout.patch application/octet-stream 20.6 KB
v15-0002-set-transaction_timeout-before-next-command.patch application/octet-stream 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2023-12-22 16:55:00 Re: Avoid computing ORDER BY junk columns unnecessarily
Previous Message Tom Lane 2023-12-22 15:24:15 Re: Avoid computing ORDER BY junk columns unnecessarily