X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 77EDC9FA5C8 for ; Wed, 14 Jun 2006 17:06:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 66736-03 for ; Wed, 14 Jun 2006 17:06:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from exchange.g2switchworks.com (mail.g2switchworks.com [63.87.162.25]) by postgresql.org (Postfix) with ESMTP id 4D9069FA3D7 for ; Wed, 14 Jun 2006 17:06:37 -0300 (ADT) Received: from 10.10.1.37 ([10.10.1.37]) by exchange.g2switchworks.com ([10.10.1.2]) with Microsoft Exchange Server HTTP-DAV ; Wed, 14 Jun 2006 20:06:35 +0000 Received: from state.g2switchworks.com by mail.g2switchworks.com; 14 Jun 2006 15:06:35 -0500 Subject: Re: autovacuum From: Scott Marlowe To: Sriram Dandapani Cc: pgsql-admin@postgresql.org In-Reply-To: <6992E470F12A444BB787B5C937B9D4DF04C4C928@ca-mail1.cis.local> References: <6992E470F12A444BB787B5C937B9D4DF04C4C928@ca-mail1.cis.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-Id: <1150315595.26538.28.camel@state.g2switchworks.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Wed, 14 Jun 2006 15:06:35 -0500 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/123 X-Sequence-Number: 22085 On Wed, 2006-06-14 at 11:52, Sriram Dandapani wrote: > Hi >=20 > =20 >=20 > I have a table into which data flows at a high rate say 2 million rows > per hour. Every 15 minutes, these rows are processed and deleted.=20 >=20 > At any point in time, the row count for the table hovers around 500K > (due to the deletes). >=20 > =20 >=20 > I have set max_fsm_pages to about 2000000. I still see the > pg_total_relation_size constantly reporting an increasing size.=20 >=20 > =20 >=20 > How do I know if autovacuum is reclaiming space or is my max_fsm > setting plain wrong. (I understand that autovacuum marks tuples for > reuse, but shouldn=E2=80=99t pg_total_relation_size take that into accoun= t) I wouldn't really rely on just autovacuum to do this. But, if you must, adjust the threshholds to have it trigger more easily. Me personally, if I'm running a script that deletes 500,000 rows, I put a vacuum at the end of it. That way you KNOW the vacuum got run.