Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id F1F091337B63 for ; Wed, 27 Oct 2010 20:24:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 24764-01 for ; Wed, 27 Oct 2010 23:24:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id 973A1133798F for ; Wed, 27 Oct 2010 20:24:42 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id 1DE83118; Wed, 27 Oct 2010 19:24:43 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FKD0QPHSKh51; Wed, 27 Oct 2010 19:24:42 -0400 (EDT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id 40DBE19; Wed, 27 Oct 2010 19:24:42 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 3A200AF8C4; Thu, 28 Oct 2010 07:24:41 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id cbtQ6IsXCIMC; Thu, 28 Oct 2010 07:24:35 +0800 (WST) Received: from [10.1.1.8] (unknown [58.7.222.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 0D9EDAF8C3; Thu, 28 Oct 2010 07:24:34 +0800 (WST) Message-ID: <4CC8B4B1.1070208@postnewspapers.com.au> Date: Thu, 28 Oct 2010 07:24:33 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc14 Thunderbird/3.1.4 MIME-Version: 1.0 To: Trenta sis CC: pgsql-performance@postgresql.org Subject: Re: Massive update, memory usage References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/522 X-Sequence-Number: 40940 On 10/28/2010 02:38 AM, Trenta sis wrote: > > Hi, > > I have a Linux Server (Debian) with Postgres 8.3 and I have problems > with a massive update, about 400000 updates/inserts. > If I execute about 100000 it seems all ok, but when I execute 400000, I > have the same problem with or without a transaction (I need to do with a > transaction) increase memory usage and disk usage. > With a execution of 400.000 inserts/update server begin woring well, but > after 100 seconds of executions increase usage of RAM, and then Swap and > finally all RAM and swap are used and execution can't finish. Do you have lots of triggers on the table? Or foreign key relationships that're DEFERRABLE ? -- Craig Ringer