Re: Unexplained growth of tables

From: Christian Kratzer <ck-lists(at)cksoft(dot)de>
To: Benjamin Krajmalnik <kraj(at)illumen(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Unexplained growth of tables
Date: 2006-07-23 12:50:37
Message-ID: 20060723143850.P64773@vesihiisi.cksoft.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

On Sun, 23 Jul 2006, Benjamin Krajmalnik wrote:
<snipp/>
> The actual number of physical rows in this table is 3404. Row width is
> 361. Table size = 639 MB.
> What can be causing this growth? Not vacuuming often enough? I hav
> pg_autovacuum running every 60 seconds. These tables have 10-15
> insert/update statements per second.
>
> Any assistance or guidance will be deeply appreciated. I am pulling
> hairs on this one.

something might be stopping vacuum from reclaiming the dead rows.

We had a similar situation with a DBD::Pg based perl script that was
monitoring the database for new jobs to perform. The script started
once, connceted to the db, prepared its statemens and then just slept
waiting for notifies.

We now have the script regularly exit and reopen a new db connection
which magically allows vacuum to reclaim rows.

Could be related to prepared staments and locks on system tables
or something of that sort.

I would recommend comparing the output of vacuum full with and
without your application connected.

Greetings
Christian

--
Christian Kratzer ck(at)cksoft(dot)de
CK Software GmbH http://www.cksoft.de/
Phone: +49 7452 889 135 Fax: +49 7452 889 136

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Christopher Browne 2006-07-23 15:09:28 Re: Unexplained growth of tables
Previous Message Peter Eisentraut 2006-07-23 11:19:28 Re: Unexplained growth of tables