Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHc8A-0000eP-8j for pgsql-performance@arkaria.postgresql.org; Thu, 05 Sep 2013 16:10:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VHc89-0001uM-G1 for pgsql-performance@arkaria.postgresql.org; Thu, 05 Sep 2013 16:10:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHc88-0001uF-BF for pgsql-performance@postgresql.org; Thu, 05 Sep 2013 16:10:00 +0000 Received: from mail.trovaprezzi.it ([2.228.21.217]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHc85-0006xP-Hp for pgsql-performance@postgresql.org; Thu, 05 Sep 2013 16:09:59 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.trovaprezzi.it (Postfix) with ESMTP id 20D1D82017; Thu, 5 Sep 2013 18:05:10 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.7pixel.local Received: from mail.trovaprezzi.it ([127.0.0.1]) by localhost (zimbra.7pixel.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rB77vbnLrNjv; Thu, 5 Sep 2013 18:05:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.trovaprezzi.it (Postfix) with ESMTP id A7D2982015; Thu, 5 Sep 2013 18:05:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.7pixel.local Received: from mail.trovaprezzi.it ([127.0.0.1]) by localhost (zimbra.7pixel.local [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fMjDE_BSen3o; Thu, 5 Sep 2013 18:05:08 +0200 (CEST) Received: from zimbra.7pixel.local (zimbra.7pixel.local [192.168.0.127]) by mail.trovaprezzi.it (Postfix) with ESMTP id 64D1182017; Thu, 5 Sep 2013 18:05:08 +0200 (CEST) Date: Thu, 5 Sep 2013 18:05:08 +0200 (CEST) From: Roberto Grandi To: Jeff Janes Cc: Kevin Grittner , pgsql-performance@postgresql.org Message-ID: <2031102275.783807.1378397108337.JavaMail.root@trovaprezzi.it> In-Reply-To: References: <535715181.700956.1378223895627.JavaMail.root@trovaprezzi.it> <441706222.701556.1378224973704.JavaMail.root@trovaprezzi.it> <1378240470.79541.YahooMailNeo@web162905.mail.bf1.yahoo.com> <1680047223.718929.1378275308275.JavaMail.root@trovaprezzi.it> Subject: Re: COPY TO and VACUUM MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [91.204.80.113] X-Mailer: Zimbra 8.0.2_GA_5569 (ZimbraWebClient - FF22 (Win)/8.0.2_GA_5569) Thread-Topic: COPY TO and VACUUM Thread-Index: qejRCNsOHeRdfOz/VJWp4Tc6eoevTw== X-Pg-Spam-Score: -4.3 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Hi Jeff, the proble is that when continously updloading vendors listing on our "big"= table the autovacuum is not able to free space as we would. Secondarly, if we launch a Vacuum after each "upload" we collide with other= upload taht are running in parallel. Is it possible, form your point of view, working with isolation levels or t= able partitioning to minimize table space growing? Thanks again for all your help. BR, Roberto ----- Messaggio originale ----- Da: "Jeff Janes" A: "Roberto Grandi" Cc: "Kevin Grittner" , pgsql-performance@postgresql.org Inviato: Mercoled=C3=AC, 4 settembre 2013 18:29:13 Oggetto: Re: [PERFORM] COPY TO and VACUUM On Tue, Sep 3, 2013 at 11:15 PM, Roberto Grandi wrote: > Hi kevin > > first of all thanks for your help. I did a mistake we are using postgres = 8.3. > > I didn't expect COPY TO frees space but I was wondering Autovacumm delete= dead rows as soon as possible, in fact my scenario is: > > - Delete all products record for a vendor > - Reload all products record (from new listing) for the same vendor. > > Obviously we repeat this process continously and table space is growing r= eally fast. It isn't obvious to me why you would do this continuously. Surely your vendors don't change their catalogs exactly as fast as your database can digest them! In any event, I'd probably just incorporate a manual vacuum statement into the delete/reload cycle. Since delete and copy are not throttled, while autovacuum is throttled by default to a rather low level, it is quite possible that default autovacuum can never keep up with the workload you are generating. Rather than trying to tune autovacuum to fit this special case, it would be easier to just throw in some manual vacuuming. (Not instead of autovac, just as a supplement to it) Cheers, Jeff --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance