Re: tuning autovacuum - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: tuning autovacuum
Date
Msg-id 4E986A8A.8090302@agliodbs.com
Whole thread Raw
In response to Re: tuning autovacuum  (Bruce Momjian <bruce@momjian.us>)
Responses Re: tuning autovacuum  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
> Ideally we would have something like checkpoint_warning that warns users
> in the log when there are too few autovacuum workers and cleanup is
> being delayed.

I don't think that any table-stats based approach is going to work.  I
think you need to measure the queue of tables which need autovacuuming.So you do something like:

If > 10% of tables and > 10 tables need autovac/autoanalyze for more
than one polling interval in a row, then emit a warning.

Note that there are solutions other than adding workers; the user could
also lower the polling interval, decrease vacuum_delay, or do other
things to make autovac faster.

This would require tracking stats about the size of the autovac queue.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Call stacks and RAISE INFO
Next
From: Thom Brown
Date:
Subject: Re: Core Extensions relocation