Re: Vacuum Problems (locking)

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: Vacuum Problems (locking)
Date: 2006-10-26 11:03:09
Message-ID: 20061026110309.GB4083@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Wed, Oct 25, 2006 at 03:54:17PM -0400, Mike Goldner wrote:
> Finally, and most important is the blocking. The vacuum duration
> reported in the log converts to about 170 minutes. I can track
> backwards in the log and the only messages prior to the 6:52am
> completion of the vacuum end at 3:57am (almost exactly 170 minutes
> prior).
>
> So, all indications point to postgres blocking all access during the
> entire vacuum.

The vacuum command you posted doesn't block. I can think of two
other explanations:

1. You just didn't have any activity then. Don't throw away
this possibility without evidence: I can't count the number of blind
alleys I've been down because someone insisted that "never happens".

2. You're completely pegged on I/O. Vacuum will make this
worse, and maybe therefore no transactions get through. You can
fiddle with the vacuum settings to get them to back off a little and
let some other transactions through.

That said, your essential problem is that one table. Vacuum it more
often -- from the look of the churn on it, I'd just put a job on it
that runs all the time and sleeps for a few seconds in between -- and
you shouldn't have this problem. But you'll need to VACUUM FULL or
dump and reload first.

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
Windows is a platform without soap, where rats run around
in open sewers.
--Daniel Eran

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jari Vauhkonen 2006-10-26 13:02:01 TCP/IP connection problem
Previous Message Shane Ambler 2006-10-26 06:38:05 Re: Backing Up Partial Databases