Re: Autovacuum and idle_session_timeout

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Japin Li <japinli(at)hotmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Autovacuum and idle_session_timeout
Date: 2021-12-30 17:01:59
Message-ID: CAECtzeXKgf=N4DLRkze9Zk6L=x3kCVXoNEF1Qqs2KTAnk7UZsw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Le jeu. 30 déc. 2021 à 17:25, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> a écrit :

> Japin Li <japinli(at)hotmail(dot)com> writes:
> > On Thu, 30 Dec 2021 at 18:53, Guillaume Lelarge <guillaume(at)lelarge(dot)info>
> wrote:
> >> pg_dump works in a single transaction, so it's already dealt with
> >> idle_in_transaction_timeout. Though I guess setting both would work too.
>
> > Attached fix this, please consider reveiew it. Thanks.
>
> This seems rather pointless to me. The idle-session timeout is only
> activated in PostgresMain's input loop, so it will never be reached
> in autovacuum or other background workers. (The same is true for
> idle_in_transaction_session_timeout, so the fact that somebody made
> autovacuum.c clear that looks like cargo-cult programming from here,
> not useful code.) And as for pg_dump, how would it ever trigger the
> timeout? It's not going to sit there thinking, especially not
> outside a transaction.
>
>
Agreed. It makes more sense. So no need for the patch. Thanks to both.

--
Guillaume.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2021-12-30 19:26:32 Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes
Previous Message Bossart, Nathan 2021-12-30 16:50:53 Re: Strange path from pgarch_readyXlog()