Add the "recheck" logic to autovacuum worker code. The worker first builds
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 28 Mar 2007 22:17:12 +0000 (22:17 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 28 Mar 2007 22:17:12 +0000 (22:17 +0000)
commit295f0e29ea28e5fede582c26856e59c198309059
tree820e825e04e6112eb9eedc3111ce931c61eec06b
parentf44d43410fe0bc886accfbc865af32584bba38b0
Add the "recheck" logic to autovacuum worker code.  The worker first builds
its table list and then rechecks pgstat before vacuuming each table to
verify that no one has vacuumed the table in the meantime.

In the current autovacuum world this only means that a worker will not
vacuum a table that a user has vacuumed manually after the worker started.
When support for multiple autovacuum workers is introduced, this will reduce
the probability of simultaneous workers on the same database doing redundant
work.
src/backend/postmaster/autovacuum.c
src/backend/postmaster/pgstat.c