Thread: Auto Vacuum Problem

Auto Vacuum Problem

From
"Gauri Kanekar"
Date:
Hi List,
 
When auto vacuum is over the dead tuple are seems to get reduced, but physical size of database do not decreases.
We are using Postgres 8.1.3 and this are the auto vacuum settings.
 
autovacuum = on                 # enable autovacuum subprocess?
autovacuum_naptime = 900                # time between autovacuum runs, in secs
autovacuum_vacuum_scale_factor = 0.1    # fraction of rel size before
autovacuum_analyze_scale_factor = 0.05  # fraction of rel size before
autovacuum_vacuum_cost_delay = 100      # default vacuum cost delay for
How do I make the physical size of the DB smaller without doing a full vacuum.
 
Can anybody help me out in this.
 
--
Regards
Gauri

Re: Auto Vacuum Problem

From
Richard Huxton
Date:
Gauri Kanekar wrote:
> Hi List,
>
> When auto vacuum is over the dead tuple are seems to get reduced, but
> physical size of database do not decreases.

It won't necessarily. An ordinary vacuum just keeps track of old rows
that can be cleared and re-used. A "vacuum full" is needed to compact
the table.

If you are running a normal vacuum often enough then the size of the
database should remain about the same (unless you insert more rows of
course).

--
   Richard Huxton
   Archonet Ltd

Re: Auto Vacuum Problem

From
"Heiko W.Rupp"
Date:
Hi,

> How do I make the physical size of the DB smaller without doing a
> full vacuum.

This might turn out to be counterproductive, as subsequent inserts
and updates will increase
the size of the physical database again, which might be expensive
depending on the underlying OS.
--
Heiko W.Rupp
heiko.rupp@redhat.com, http://www.dpunkt.de/buch/3-89864-429-4.html