Re: Unexplained growth of tables

From: "Benjamin Krajmalnik" <kraj(at)illumen(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Unexplained growth of tables
Date: 2006-07-23 20:05:53
Message-ID: BF337097BDD9D849A2F4B818DDB2798702949E@stash.stackdump.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I am running 8.1.4 on Windows.
Quick question - I assume CLUSTER will lock the tables, correct?
In my scenario where the number of live rows is very small but the
number of dead rows is huge, how long will tis take?
I have a problem in that this database is a live monitoring system which
I cannot take down for too long.

The only database on this server (other than the postgres database) is
this database.
>From your experience, based on the activity of this database, how often
should I run autovacuum?

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Sunday, July 23, 2006 11:48 AM
> To: Peter Eisentraut
> Cc: pgsql-admin(at)postgresql(dot)org; Benjamin Krajmalnik
> Subject: Re: [ADMIN] Unexplained growth of tables
>
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Benjamin Krajmalnik wrote:
> >> What can be causing this growth? Not vacuuming often enough?
>
> > The is exactly the reason.
>
> >> I hav
> >> pg_autovacuum running every 60 seconds. These tables have 10-15
> >> insert/update statements per second.
>
> > You should probably run VACUUM FULL to get the table back
> to a normal
> > size and then closely monitor what pg_autovacuum actually does.
>
> CLUSTER might be a better answer, since VACUUM FULL won't do
> anything to help shrink the indexes.
>
> As for the pg_autovacuum frequency, realize that
> pg_autovacuum processes one database per firing. So if you
> have N databases, any one database is going to be looked at
> every N*60 seconds, not every 60 seconds.
> You might need a shorter autovacuum cycle.
>
> Lastly, what PG version is this? We had some bugs that kept
> autovacuum from being fully informed in some cases, but AFAIK
> they're all fixed in the latest minor releases.
>
> regards, tom lane
>

Browse pgsql-admin by date

  From Date Subject
Next Message Mark Matthews 2006-07-23 22:43:15 DBA tasks
Previous Message Mingzuo Shen 2006-07-23 20:02:33 Read db files directly