Thread: pre-Vacuum statistics

pre-Vacuum statistics

From
Rich Cullingford
Date:
Greetings,
All the recommendations I can locate concerning the use of (the various
flavors of) VACUUM suggest running it at regular intervals. Is there any
way, for a given table, to discover how many/what percentage of rows are
likely to be VACUUMable at a given point, so that some kind of
threshold-based VACUUM could be done by an application? We have several
tables that undergo bursty UPDATEs, where large numbers of transactions
occur "relatively" infrequently; and others where the UPDATEs occur at
regular intervals (a few seconds or so).

Thanks for any advice!

                     Regards,
                     Rich Cullingford
                     rculling@sysd.com


Re: pre-Vacuum statistics

From
Rod Taylor
Date:
On Thu, 2003-07-10 at 18:19, Rich Cullingford wrote:
> Greetings,
> All the recommendations I can locate concerning the use of (the various
> flavors of) VACUUM suggest running it at regular intervals. Is there any
> way, for a given table, to discover how many/what percentage of rows are

Not nicely, but you may want to look at pg_autovacuum either off gborg
or in the 7.4 /contrib/pg_autovacuum directory.

It will fire off a periodic vacuum based on table activity from the
statistics system.

Attachment