Re: Vacuum goes worse - Mailing list pgsql-performance

From Alvaro Herrera
Subject Re: Vacuum goes worse
Date
Msg-id 20071017160742.GJ5737@alvh.no-ip.org
Whole thread Raw
In response to Re: Vacuum goes worse  ("Stefano Dal Pra" <s.dalpra@gmail.com>)
List pgsql-performance
Stefano Dal Pra escribió:
> Your first post says vacuum goes worse (slower).
> I see that you do not issue the -f option (FULL VACUUM).
>
> I had a similar situation with a server (with frequent update)
> performing nightly vacuumdb. After a few many days it went
> slower and slower.

When you have that problem, the solution is to issue more plain vacuum
(not full) more frequently.  If it's a highly updated table, then maybe
once per hour or more.  It depends on the update rate.

> With psql 8.2.x we adopted pg_autovacuum which seems to perform good,
> even thought
> i do not clearly understand whether it occasionally performs a full
> vacuum (i think he does'nt).

It doesn't because it's normally not necessary.  Also, we don't want to
be acquiring exclusive locks in a background automatic process, so if
you really need vacuum full (and I question your need to) then you must
issue it yourself.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Vacuum goes worse
Next
From: Chris Kratz
Date:
Subject: Incorrect estimates on columns