Re: Avoid Wraparound Failures

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: Avoid Wraparound Failures
Дата
Msg-id 2f793dec73ab3798414574bda751e668d9d47ed8.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: Avoid Wraparound Failures  (Loles <lolesft@gmail.com>)
Список pgsql-admin
On Sat, 2022-03-26 at 07:47 +0100, Loles wrote:
> So, if I have understood it correctly:
> 
> 1) set autovacuum_vacuum_cost_delay from 20 to 2

It is not strictly required, but that will keep autovacuum from taking
forever to process your big tables.

It has no influence on manual VACUUM though.

> 2) execute, only for the largest tables, vacuum command:
> 
>    vacuum tab1;
>    vacuum tab2;
> 
>    and so on

If you don't want to wait for autovacuum to do it automatically, yes.

> 3) Sleep peacefully :)

Definitely.  This is normal behavior.

> Another doubt: query filtered relkind = 'r' but there are also sequences, views, catalog tables... that are also
closeto 200 million. 
 

Sequences and views are don't need VACUUM.
Materialized views and catalog tables do.

> Vacuum the catalog tables too or is it not necessary?

Same as all other tables: do it manually or let autovacuum do it automatically.

> I understand that the views, sequences and everything that depends on the table will improve by vacuuming that
table.

There is no influence on sequences.

VACUUM can improve the performance of some queries, but mostly it is about keeping your tables
healthy and in good shape.  Views may benefit just like all other queries do.

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




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

Предыдущее
От: Vijaykumar Jain
Дата:
Сообщение: Re: Avoid Wraparound Failures
Следующее
От: Michael Banck
Дата:
Сообщение: Re: Avoid Wraparound Failures