pgsql: Make VACUUM avoid waiting for a cleanup lock, where possible.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make VACUUM avoid waiting for a cleanup lock, where possible.
Date: 2011-11-08 02:46:58
Message-ID: E1RNbiE-00078v-P8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/bbb6e559c4ea0fb4c346beda76736451dc24eb4e

Modified Files
--------------
src/backend/access/heap/heapam.c | 38 ++++++++++++++++
src/backend/commands/vacuumlazy.c | 86 +++++++++++++++++++++++++++++++++++--
src/include/access/heapam.h | 2 +
3 files changed, 122 insertions(+), 4 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2011-11-08 02:51:47 pgsql: Remove hstore's text => text operator.
Previous Message Robert Haas 2011-11-07 17:27:48 pgsql: Minor grammar improvements.