X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id F12919FA1E2 for ; Sun, 23 Jul 2006 17:06:07 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 35862-04 for ; Sun, 23 Jul 2006 20:05:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stash.illumen.com (unknown [64.207.29.137]) by postgresql.org (Postfix) with ESMTP id 807459FA47F for ; Sun, 23 Jul 2006 17:05:58 -0300 (ADT) Content-class: urn:content-classes:message Subject: Re: Unexplained growth of tables MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Sun, 23 Jul 2006 14:05:53 -0600 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [ADMIN] Unexplained growth of tables Thread-Index: AcaugDNVQoKBe9NcQ0OGRIpUOk54VgAEq1vA From: "Benjamin Krajmalnik" To: "Tom Lane" , "Peter Eisentraut" Cc: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/183 X-Sequence-Number: 22429 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@sss.pgh.pa.us]=20 > Sent: Sunday, July 23, 2006 11:48 AM > To: Peter Eisentraut > Cc: pgsql-admin@postgresql.org; Benjamin Krajmalnik > Subject: Re: [ADMIN] Unexplained growth of tables=20 >=20 > Peter Eisentraut writes: > > Benjamin Krajmalnik wrote: > >> What can be causing this growth? Not vacuuming often enough? >=20 > > The is exactly the reason. >=20 > >> I hav > >> pg_autovacuum running every 60 seconds. These tables have 10-15=20 > >> insert/update statements per second. >=20 > > You should probably run VACUUM FULL to get the table back=20 > to a normal=20 > > size and then closely monitor what pg_autovacuum actually does. >=20 > CLUSTER might be a better answer, since VACUUM FULL won't do=20 > anything to help shrink the indexes. >=20 > As for the pg_autovacuum frequency, realize that=20 > pg_autovacuum processes one database per firing. So if you=20 > have N databases, any one database is going to be looked at=20 > every N*60 seconds, not every 60 seconds. > You might need a shorter autovacuum cycle. >=20 > Lastly, what PG version is this? We had some bugs that kept=20 > autovacuum from being fully informed in some cases, but AFAIK=20 > they're all fixed in the latest minor releases. >=20 > regards, tom lane >=20