pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Make VACUUM avoid waiting for a cleanup lock, where possible.
Date: Tue, 08 Nov 2011 02:46:58 +0000
Message-ID: <E1RNbiE-00078v-P8@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1RNbiE-00078v-P8@gemulon.postgresql.org>
Permalink:  ../E1RNbiE-00078v-P8@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1RNbiE-00078v-P8@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Make VACUUM avoid waiting for a cleanup lock, where possible.
  In-Reply-To: <E1RNbiE-00078v-P8@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox