Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T26zm-0004qr-Fc for pgsql-performance@postgresql.org; Thu, 16 Aug 2012 20:48:46 +0000 Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1T26zk-0006Rb-3g for pgsql-performance@postgresql.org; Thu, 16 Aug 2012 20:48:45 +0000 X-Originating-IP: 217.70.178.129 Received: from mfilter12-d.gandi.net (mfilter12-d.gandi.net [217.70.178.129]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id DA2D1A8076; Thu, 16 Aug 2012 22:48:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter12-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter12-d.gandi.net (mfilter12-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id HL4MP6jW+8RU; Thu, 16 Aug 2012 22:48:31 +0200 (CEST) X-Originating-IP: 98.27.54.176 Received: from [192.168.10.146] (cpe-098-027-054-176.nc.res.rr.com [98.27.54.176]) (Authenticated sender: adsend@dunslane.net) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 3CBF3A807A; Thu, 16 Aug 2012 22:48:31 +0200 (CEST) Message-ID: <502D5C9D.4020502@dunslane.net> Date: Thu, 16 Aug 2012 16:48:29 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0 MIME-Version: 1.0 To: Anibal David Acosta CC: pgsql-performance@postgresql.org Subject: Re: best practice to avoid table bloat? References: <009d01cd7bee$785b1380$69113a80$@devshock.com> In-Reply-To: <009d01cd7bee$785b1380$69113a80$@devshock.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201208/113 X-Sequence-Number: 47651 On 08/16/2012 04:33 PM, Anibal David Acosta wrote: > > Hi, > > if I have a table that daily at night is deleted about 8 millions of > rows (table maybe has 9 millions) is recommended to do a vacuum > analyze after delete completes or can I leave this job to autovacuum? > > This table is very active during the day but less active during night > > I think that the only only thing where Postgres is weak, is in this > area (table and index bloat). > > For some reason for the same amount of data every day postgres consume > a little more. > > Check out pg_reorg. cheers andrew