pgsql: Add the "recheck" logic to autovacuum worker code.

From: alvherre(at)postgresql(dot)org (Alvaro Herrera)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add the "recheck" logic to autovacuum worker code.
Date: 2007-03-28 22:17:13
Message-ID: 20070328221713.1E00D9FBB3D@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/backend/postmaster:
autovacuum.c (r1.39 -> r1.40)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/autovacuum.c.diff?r1=1.39&r2=1.40)
pgstat.c (r1.150 -> r1.151)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/pgstat.c.diff?r1=1.150&r2=1.151)

Browse pgsql-committers by date

  From Date Subject
Next Message Neil Conway 2007-03-28 22:48:58 pgsql: Replace 4-clause licensed blf.[ch] with blowfish implementation
Previous Message User Mha 2007-03-28 20:58:36 pginstaller - pginst: Fix another warning msvc caught.