Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue)

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue)
Дата
Msg-id CAH2-Wzne4Wgaaruq-VSY2qWNhxcPRqWUbdwVQPkM81TpaHY_kQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue)
Список pgsql-bugs
On Thu, Dec 15, 2022 at 10:56 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> * A better idea, though sadly not very back-patchable, could
> be to expose a VACUUM option to control whether it runs
> vac_update_datfrozenxid, so that vacuumdb can do that just
> once at the end.  Considering that vac_update_datfrozenxid
> requires an exclusive lock, the current behavior is poison for
> parallel vacuuming quite aside from the O(N^2) issue.  This
> might tie into some work Peter G. has been pursuing, too.

That sounds like a good idea to me. But do we actually need a VACUUM
option for this? I wonder if we could get away with having the VACUUM
command never call vac_update_datfrozenxid(), except when run in
single-user mode. It would be nice to make pg_xact/clog truncation
autovacuum's responsibility.

Autovacuum already does things differently to the VACUUM command, and
for reasons that seem related to this complaint about vacuumdb.
Besides, autovacuum is already on the hook to call
vac_update_datfrozenxid() for the benefit of databases that haven't
actually been vacuumed, per the do_autovacuum() comments right above
its vac_update_datfrozenxid() call.

-- 
Peter Geoghegan



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue)
Следующее
От: Jean-Francois Levesque
Дата:
Сообщение: Re: BUG #17710: Slow queries (100% CPU) after auto-vacuum