Re: Autovacuum and idle_session_timeout

Поиск
Список
Период
Сортировка
От Japin Li
Тема Re: Autovacuum and idle_session_timeout
Дата
Msg-id MEYP282MB166937429016B7184960D756B6469@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответ на Re: Autovacuum and idle_session_timeout  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 31 Dec 2021 at 00:24, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Japin Li <japinli@hotmail.com> writes:
>> On Thu, 30 Dec 2021 at 18:53, Guillaume Lelarge <guillaume@lelarge.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.
>

Thanks for your clarify!  If the timeout never be reached, should we remove
those settings?

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Adding CI to our tree
Следующее
От: Amit Langote
Дата:
Сообщение: Re: generic plans and "initial" pruning