]> granicus.if.org Git - postgresql/commit
Make VACUUM avoid waiting for a cleanup lock, where possible.
authorRobert Haas <rhaas@postgresql.org>
Tue, 8 Nov 2011 02:39:40 +0000 (21:39 -0500)
committerRobert Haas <rhaas@postgresql.org>
Tue, 8 Nov 2011 02:39:40 +0000 (21:39 -0500)
commitbbb6e559c4ea0fb4c346beda76736451dc24eb4e
treea49de5afba6376d371afaf3e78bcc1a117a6f37f
parentbd2396988a1afbcb6424700e52a62f34d2951bdd
Make VACUUM avoid waiting for a cleanup lock, where possible.

In a regular VACUUM, it's OK to skip pages for which a cleanup lock
isn't immediately available; the next VACUUM will deal with them.  If
we're scanning the entire relation to advance relfrozenxid, we might
need to wait, but only if there are tuples on the page that actually
require freezing.  These changes should greatly reduce the incidence
of of vacuum processes getting "stuck".

Simon Riggs and Robert Haas
src/backend/access/heap/heapam.c
src/backend/commands/vacuumlazy.c
src/include/access/heapam.h