Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VH8Aq-0006EA-G7 for pgsql-performance@arkaria.postgresql.org; Wed, 04 Sep 2013 08:10:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VH8Aq-0000dS-0F for pgsql-performance@arkaria.postgresql.org; Wed, 04 Sep 2013 08:10:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VH8Ao-0000dL-Vj for pgsql-performance@postgresql.org; Wed, 04 Sep 2013 08:10:47 +0000 Received: from nm6.bullet.mail.bf1.yahoo.com ([98.139.212.165]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VH8Al-0005IV-Vl for pgsql-performance@postgresql.org; Wed, 04 Sep 2013 08:10:46 +0000 Received: from [98.139.212.148] by nm6.bullet.mail.bf1.yahoo.com with NNFMP; 04 Sep 2013 08:10:42 -0000 Received: from [98.139.212.195] by tm5.bullet.mail.bf1.yahoo.com with NNFMP; 04 Sep 2013 08:10:42 -0000 Received: from [127.0.0.1] by omp1004.mail.bf1.yahoo.com with NNFMP; 04 Sep 2013 08:10:42 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 194068.24624.bm@omp1004.mail.bf1.yahoo.com Received: (qmail 27972 invoked by uid 60001); 4 Sep 2013 08:10:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1378282242; bh=TkGWmYHzjaVwMiQ2YI645+Fqogdhcf3q8POWDgsPaG8=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=nm8oVOYijqHKJYm3Nvj5jATXWsa3JKDIPoOTW9H3ooJNW7Dt8RRyVRDdj1Ig3ak5Yk8m/fNKGEY23ue+EQ/JR2V4VSxopqWoZ4SzFXS9UFTSLI2oDY/Qu0Cs0y/U9Qk/YqLK3tcYQEN49Kmq7mc3MQ6RYbdkh87yUW+UUcZnTSo= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=lCG6nABgGtZzKo7UqHNY68lX+Yd5P9kA52gyb87C8wrH+TvcdXS6owM0c95QmE1/+b72zH9tSkf3tZKRo7VhtaoaIU5hXYwcPUKcyZiD2Re70BgfobZUExh08m/5Pi+DGsV5zX5yuhLUjCj/9YA4GoOJRrJTwPWGgJa6YRgTxCo=; X-YMail-OSG: HxDwGeUVM1l2S8E1LerUunGk5tu.0EOZWxGWmAiuvKInIty pVi0eRcJ3LPna1kxtdSO1YCfO0VjKFNKvYTsPJSdJiivTfpAwxNfgSiUn.vv A6KN5CbboTY6AlVXqQj0Wu1HMTe9RjvKP4QoRy82VfFck4951TrvxII9L2AS 0VOBBAzcJAH1P7upMamHfijXOJ7toGWYldmouebYlRA.8E72heu69N_JfkHn 1GOmJHIBsEap1WJC1IXpEjr612xTxpc51ijUA.cO.wMCW8K_ohyipr1NG8JC fs9OsEyRg2z7wbNDQAY1g.kmWO8qwFtgV41SRtZzGB_o2kyoML0NKBz4gYsg YHedbEJdWOoAT80vf6q7HLgyM9P7HkYCAyMDOC6fOq0bjgcHC6J4TJpLgkgB rqKjtvp8Z8dFBvlaSmoJXs78XYMm8O.9qOrFhInEUvN.IcnHFnLbSl9kTpOj Es8Di9ghMD5SZjlDCeW1NKNy5lAeAJMD7V5N2DEd_sDdVomOeJhKDdZ0_HjP IpeDkA3YSCspV0V5yQP.cFzKkU4qYwDwrdW9BmBSlO1G.XFpdnbnWZB_gNb6 nZ2Al9epLbEpus..8K9H6XR1MNdJXfDxiJOpgyD4.5QeOwtp4DsGrZR_DHYJ IxLVkqyREmWV5l2X8WLLaAL.iL.NwE2IVOjblyDwNJNNpz54a_3PtvP1ssEm E5VT_3whxzw.i8UhkHW4.JPT5ZAcAbg-- Received: from [76.255.18.237] by web162905.mail.bf1.yahoo.com via HTTP; Wed, 04 Sep 2013 01:10:41 PDT X-Rocket-MIMEInfo: 002.001, Um9iZXJ0byBHcmFuZGkgPHJvYmVydG8uZ3JhbmRpQHRyb3ZhcHJlenppLml0PiB3cm90ZToKCj4gd2UgYXJlIHVzaW5nIHBvc3RncmVzIDguMy4KCj4gbXkgc2NlbmFyaW8gaXM6Cj4KPiAtIERlbGV0ZSBhbGwgcHJvZHVjdHMgcmVjb3JkIGZvciBhIHZlbmRvcgo.IC0gUmVsb2FkIGFsbCBwcm9kdWN0cyByZWNvcmQgKGZyb20gbmV3IGxpc3RpbmcpIGZvciB0aGUgc2FtZQo.wqDCoCB2ZW5kb3IuCj4KPiBPYnZpb3VzbHkgd2UgcmVwZWF0IHRoaXMgcHJvY2VzcyBjb250aW5vdXNseSBhbmQgdGFibGUgc3BhY2UBMAEBAQE- X-Mailer: YahooMailWebService/0.8.156.576 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> Message-ID: <1378282241.27940.YahooMailNeo@web162905.mail.bf1.yahoo.com> Date: Wed, 4 Sep 2013 01:10:41 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: COPY TO and VACUUM To: Roberto Grandi Cc: "pgsql-performance@postgresql.org" In-Reply-To: <1680047223.718929.1378275308275.JavaMail.root@trovaprezzi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.0 (--) 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 Roberto Grandi wrote: > we are using postgres 8.3. > my scenario is: > > - Delete all products record for a vendor > - Reload all products record (from new listing) for the same >=A0=A0 vendor. > > Obviously we repeat this process continously and table space is > growing really fast. > > Can you suggest me an approach for autovacuum within this > scenario and, if you want, suggest me an appropriate version of > postgres that help solving my problem? At this point I would recommend the latest minor release of 9.2 for production use.=A0 If you were early in a development cycle I would suggest considering the soon-to-be-released 9.3.0.=A0 Be sure to stay current on minor releases. http://www.postgresql.org/support/versioning/ If your table space is growing fast with this usage pattern, it suggests that autovacuum is not configured to be aggressive enough. My suggestions: Make sure autovacuum is on. Decrease autovacuum_naptime to 15s, so that it will notice deletes sooner. You could consider reducing autovacuum_scale_factor below the default of 0.2 so that it triggers based on fewer deletes. You should probably set autovacuum_vacuum_cost_limit to 400 and incrementally increase it until autovacuum is able to keep up with the activity you describe.=A0 It defaults to 200 and I have had to set it to 650 on some systems to allow it to keep up.=A0 It wouldn't be surprising if some systems need a higher setting.=A0 Higher settings may cause autovacuum activity to have a more noticeable impact on foreground processes; but if it is too low, you will develop bloat which will harm performance and eat disk space. If all autovacuum workers are sometimes busy with big tables for extended periods and you see other tables neglected for too long, you should boost autovacuum_max_workers until that problem is solved. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance