X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7502552822 for ; Sun, 3 Jul 2005 11:23:48 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 32178-07 for ; Sun, 3 Jul 2005 14:23:42 +0000 (GMT) Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by svr1.postgresql.org (Postfix) with ESMTP id 676D85281B for ; Sun, 3 Jul 2005 11:23:41 -0300 (ADT) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id j63ENciE092322 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 3 Jul 2005 08:23:41 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.3/8.13.3) with ESMTP id j63ENcdm039559; Sun, 3 Jul 2005 08:23:38 -0600 (MDT) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.3/8.13.3/Submit) id j63ENcho039558; Sun, 3 Jul 2005 08:23:38 -0600 (MDT) (envelope-from mfuhr) Date: Sun, 3 Jul 2005 08:23:38 -0600 From: Michael Fuhr To: Mike.Samson@apcc.com Cc: pgsql-admin@postgresql.org Subject: Re: database size after a DELETE and VACUUM Message-ID: <20050703142337.GA39504@winnie.fuhr.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/11 X-Sequence-Number: 18067 On Fri, Jul 01, 2005 at 09:30:50AM -0400, Mike.Samson@apcc.com wrote: > > I would expect the database size to decrease after the VACUUM. Note what the documentation says about VACUUM and recovering disk space: http://www.postgresql.org/docs/8.0/static/maintenance.html#VACUUM-FOR-SPACE-RECOVERY "There are two variants of the VACUUM command. The first form, known as 'lazy vacuum' or just VACUUM, marks expired data in tables and indexes for future reuse; it does not attempt to reclaim the space used by this expired data immediately. Therefore, the table file is not shortened, and any unused space in the file is not returned to the operating system. This variant of VACUUM can be run concurrently with normal database operations." "The standard form of VACUUM is best used with the goal of maintaining a fairly level steady-state usage of disk space. If you need to return disk space to the operating system you can use VACUUM FULL -- but what's the point of releasing disk space that will only have to be allocated again soon?" -- Michael Fuhr http://www.fuhr.org/~mfuhr/