Re: Avoid Wraparound Failures - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Avoid Wraparound Failures
Date
Msg-id 2f793dec73ab3798414574bda751e668d9d47ed8.camel@cybertec.at
Whole thread Raw
In response to Re: Avoid Wraparound Failures  (Loles <lolesft@gmail.com>)
List 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 by date:

Previous
From: Vijaykumar Jain
Date:
Subject: Re: Avoid Wraparound Failures
Next
From: Michael Banck
Date:
Subject: Re: Avoid Wraparound Failures