Обсуждение: Vacuuming and already vacuumed table?
Greetings,
Would it make sense for vacuum to keep a list of 'last vacuumed' or
similar so that it doesn't vacuum a table which hasn't changed since
the last time it was vacuum'd? Seems to me that would be a pretty
simple optimization which would help out alot on systems which have
both a large set of tables which are relatively static and data which
changes a great deal. This is especially true for vacuum full which
also locks the table.
Thoughts?
Thanks,
Stephen
Вложения
On Thu, 2003-08-28 at 16:53, Stephen Frost wrote: > Would it make sense for vacuum to keep a list of 'last vacuumed' or > similar so that it doesn't vacuum a table which hasn't changed since > the last time it was vacuum'd? Seems to me that would be a pretty > simple optimization which would help out alot on systems which have > both a large set of tables which are relatively static and data which > changes a great deal. This is especially true for vacuum full which > also locks the table. 7.4Beta has a contrib module called pg_autovacuum. It attempts to do exactly what you are talking about. It only vacuums a table that has had sufficient activity since the last vacuum. It runs as a standalone daemon. Also, it can be used against 7.3 if that is what you are running.
In the last exciting episode, sfrost@snowman.net (Stephen Frost) wrote: > Would it make sense for vacuum to keep a list of 'last vacuumed' or > similar so that it doesn't vacuum a table which hasn't changed since > the last time it was vacuum'd? Seems to me that would be a pretty > simple optimization which would help out alot on systems which have > both a large set of tables which are relatively static and data which > changes a great deal. This is especially true for vacuum full which > also locks the table. See, in 7.4, the "pg_autovacuum" daemon. It does much what you suggest... -- (format nil "~S@~S" "cbbrowne" "ntlug.org") http://www.ntlug.org/~cbbrowne/finances.html Rules of the Evil Overlord #110. "I will not employ devious schemes that involve the hero's party getting into my inner sanctum before the trap is sprung." <http://www.eviloverlord.com/>