Re: autovacuum default run with vacuum_index_cleanup and vacuum_truncate and related lock?

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: autovacuum default run with vacuum_index_cleanup and vacuum_truncate and related lock?
Дата
Msg-id 9a196c5db21caadb873493439011e4959d387ffe.camel@cybertec.at
обсуждение исходный текст
Ответ на autovacuum default run with vacuum_index_cleanup and vacuum_truncate and related lock?  ("James Pang (chaolpan)" <chaolpan@cisco.com>)
Список pgsql-admin
On Mon, 2022-02-07 at 08:43 +0000, James Pang (chaolpan) wrote:
> It’s Postgres 13 version, we plan to migrate from Oracle to Postgres 13 on RHEL8.
> One maintain job is about autovacuum, with default config,  autovacuum will do on
> tables with  “vacuum_index_cleanup” and “vacuum_truncate” option?
> With both options, autovacuum woker will hold “access exclusive” lock when truncate
> empty blocks and cleanup index ?  if that’s true, how to handle autovacuum to reduce
> the lock blocking issue?

Cleaning up the index will not take any locks that block data modifications.

The ACCESS EXCLUSIVE lock for truncation is only held for a very short time
and won't bother you (unless perhaps, you could get replication conflicts on
a standby server).

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




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

Предыдущее
От: Dan Smith
Дата:
Сообщение: Re: [Help][Service not coming-up]
Следующее
От: Axel Rau
Дата:
Сообщение: Re: restarting logical replication after upgrading standby