pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Uwe Bartels <uwe.bartels@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: blocking automatic vacuum
Date: Tue, 22 Jun 2010 10:48:03 -0400
Message-ID: <1494.1277218083@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTikICmG_zdZRULEsoBSvxzRuPxwPgomRUsAVWgWl@mail.gmail.com>
References: <AANLkTikICmG_zdZRULEsoBSvxzRuPxwPgomRUsAVWgWl@mail.gmail.com>

Uwe Bartels <uwe.bartels@gmail.com> writes:
> last ween i've seen a blocking "automatic vacuum".
> as i understood, this is not supposed to happen. in the past i saw vacuum
> processes disappear, in case of the need of a lock.

What that sounds like is it was an anti-wraparound vacuum.  Autovacuum
won't cancel those to avoid delaying other processes.

Now, RowExclusiveLock doesn't conflict with an autovacuum, so there is
more going on here than you've showed us.  The other obvious question is
how did you get to the point where an anti-wraparound vacuum became
necessary.

I speculate that you are doing something that does conflict with vacuum
(ie, SHARE UPDATE EXCLUSIVE lock or higher), and are doing it so often
that regular autovacuum runs on the table never manage to complete.
This is very bad, because you're going to have a serious bloat problem
if autovac keeps getting canceled.  You need to look at what sort of DDL
you are repetitively executing on that table, and find a way to do it a
lot less often.

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <1494.1277218083@sss.pgh.pa.us>
Permalink:  ../1494.1277218083@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1494.1277218083@sss.pgh.pa.us

 · 

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, uwe.bartels@gmail.com
  Subject: Re: blocking automatic vacuum
  In-Reply-To: <1494.1277218083@sss.pgh.pa.us>

* 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