Re: VACUUMing a live site OK? - Mailing list pgsql-admin

From Stephan Szabo
Subject Re: VACUUMing a live site OK?
Date
Msg-id Pine.BSF.4.21.0110190906270.32118-100000@megazone23.bigpanda.com
Whole thread Raw
In response to VACUUMing a live site OK?  ("Shuzo Kubo" <gardenweasel@hotmail.com>)
List pgsql-admin
On Fri, 19 Oct 2001, Shuzo Kubo wrote:

> Hi,
>
> I have a web application using PostgreSQL 7.1.3 with a table that
> experiences alot of UPDATEs. I shouldn't be updating the data so much to
> start off with but can no longer avoid the situation.
>
> I would like to vacuum a table (1 table only) to maintain an acceptable
> performance. Is it safe to vacuum a table when users are attempting to
> SELECT from or UPDATE to it? I would imagine that the table would get locked
> and there should be no problems.

That should be fine.  The vacuum should wait until any transactions
currently locking the table finish and any other transactions that want to
access the table should wait for the vacuum. One warning is that if you
have any kind of persistant connections, you may see things were a
transaction has a lock and goes idle (no statements) which will cause
the vacuum to sit and wait and other transactions to line up behind it.



pgsql-admin by date:

Previous
From: Allan Engelhardt
Date:
Subject: [repost] pg_restore doesn't work with custom format?
Next
From: Lenny Mastrototaro
Date:
Subject: Re: Freeing Connections