Re: Transaction timeout

From: wenhui qiu <qiuwenhuifx(at)gmail(dot)com>
To: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Cc: Thomas wen <Thomas_valentine_365(at)outlook(dot)com>, "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Japin Li <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-20 12:23:13
Message-ID: CAGjGUA+_PfFvdYaOpU+T8sgKBtGNcVNEPbX6x7-FruERuE6oog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Junwang Zhao
Agree +1

Best whish

Junwang Zhao <zhjwpku(at)gmail(dot)com> 于2023年12月20日周三 10:35写道:

> On Wed, Dec 20, 2023 at 9:58 AM Thomas wen
> <Thomas_valentine_365(at)outlook(dot)com> wrote:
> >
> > Hi Junwang Zhao
> > #should we invalidate lock_timeout? Or maybe just document this.
> > I think you mean when lock_time is greater than trasaction-time
> invalidate lock_timeout or needs to be logged ?
> >
> I mean the interleaving of the gucs, which is lock_timeout and the new
> introduced transaction_timeout,
> if lock_timeout >= transaction_timeout, seems no need to enable
> lock_timeout.
> >
> >
> >
> > Best whish
> > ________________________________
> > 发件人: Junwang Zhao <zhjwpku(at)gmail(dot)com>
> > 发送时间: 2023年12月20日 9:48
> > 收件人: Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru>
> > 抄送: Japin Li <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>
> > 主题: Re: Transaction timeout
> >
> > On Tue, Dec 19, 2023 at 10:51 PM Junwang Zhao <zhjwpku(at)gmail(dot)com> wrote:
> > >
> > > On Tue, Dec 19, 2023 at 6:27 PM Andrey M. Borodin <
> x4mmm(at)yandex-team(dot)ru> wrote:
> > > >
> > > >
> > > >
> > > > > On 19 Dec 2023, at 13:26, Andrey M. Borodin <x4mmm(at)yandex-team(dot)ru>
> wrote:
> > > > >
> > > > > I don’t have Windows machine, so I hope CF bot will pick this.
> > > >
> > > > I used Github CI to produce version of tests that seems to be is
> stable on Windows.
> > > > Sorry for the noise.
> > > >
> > > >
> > > > Best regards, Andrey Borodin.
> > >
> > > + <para>
> > > + If <varname>transaction_timeout</varname> is shorter than
> > > + <varname>idle_in_transaction_session_timeout</varname> or
> > > <varname>statement_timeout</varname>
> > > + <varname>transaction_timeout</varname> will invalidate longer
> timeout.
> > > + </para>
> > >
> > > When transaction_timeout is *equal* to
> idle_in_transaction_session_timeout
> > > or statement_timeout, idle_in_transaction_session_timeout and
> statement_timeout
> > > will also be invalidated, the logic in the code seems right, though
> > > this document
> > > is a little bit inaccurate.
> > >
> > <para>
> > Unlike <varname>statement_timeout</varname>, this timeout can
> only occur
> > while waiting for locks. Note that if
> > <varname>statement_timeout</varname>
> > is nonzero, it is rather pointless to set
> > <varname>lock_timeout</varname> to
> > the same or larger value, since the statement timeout would
> always
> > trigger first. If <varname>log_min_error_statement</varname> is
> set to
> > <literal>ERROR</literal> or lower, the statement that timed out
> will be
> > logged.
> > </para>
> >
> > There is a note about statement_timeout and lock_timeout, set both
> > and lock_timeout >= statement_timeout is pointless, but this logic seems
> not
> > implemented in the code. I am wondering if lock_timeout >=
> transaction_timeout,
> > should we invalidate lock_timeout? Or maybe just document this.
> >
> > > --
> > > Regards
> > > Junwang Zhao
> >
> >
> >
> > --
> > Regards
> > Junwang Zhao
> >
> >
>
>
> --
> Regards
> Junwang Zhao
>
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2023-12-20 12:26:36 Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Previous Message Shlok Kyal 2023-12-20 12:22:26 Re: speed up a logical replica setup