Re: Vacuum Problems (locking) - Mailing list pgsql-admin

From Andrew Sullivan
Subject Re: Vacuum Problems (locking)
Date
Msg-id 20061026110309.GB4083@phlogiston.dyndns.org
Whole thread Raw
In response to Vacuum Problems (locking)  (Mike Goldner <mgoldner@agmednet.com>)
List 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@crankycanuck.ca
Windows is a platform without soap, where rats run around
in open sewers.
        --Daniel Eran

pgsql-admin by date:

Previous
From: Shane Ambler
Date:
Subject: Re: Backing Up Partial Databases
Next
From: Jari Vauhkonen
Date:
Subject: TCP/IP connection problem