Re: Autovacuum not functioning for large tables but it is working for few other small tables. - Mailing list pgsql-general

From Jeff Janes
Subject Re: Autovacuum not functioning for large tables but it is working for few other small tables.
Date
Msg-id CAMkU=1ymu9dTz99ALJA-kwDkQzp33Q9gfKS374+kxbJB4v65vg@mail.gmail.com
Whole thread Raw
In response to Autovacuum not functioning for large tables but it is working for few other small tables.  (M Tarkeshwar Rao <m.tarkeshwar.rao@ericsson.com>)
List pgsql-general
On Wed, Dec 16, 2020 at 6:55 AM M Tarkeshwar Rao <m.tarkeshwar.rao@ericsson.com> wrote:

...

 

All the threshold level requirements for autovacuum was meet and there are about Million’s of  dead tuples but autovacuum was unable to clear them, which cause performance issue on production server.


It might be helpful for us to see what data you are looking at to reach this conclusion.
 

 

Is autovacuum not working against large sized tables or Is there any parameters which  need to set to make autovacuum functioning?


Autovacuum is not inherently broken for large tables.  But vacuuming them takes longer than for small tables.  If it is frequently interrupted by things like CREATE INDEX, ALTER TABLE, or database shutdown and restart, then it might never get through the entire table without interruption. If it is getting interrupted, you should see messages in the log file about it.  You can also check pg_stat_user_tables to see when it was last successfully (to completion) auto vacuumed, and on new enough versions you can look in pg_stat_progress_vacuum to monitor the vacuuming while it occurs.
 
Cheers,

Jeff

pgsql-general by date:

Previous
From: Michael Lewis
Date:
Subject: Re: Autovacuum not functioning for large tables but it is working for few other small tables.
Next
From: Jack Orenstein
Date:
Subject: Very large table: Partition it or not?