Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id EF3A8650EDD for ; Thu, 26 Jun 2008 07:31:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 12811-03 for ; Thu, 26 Jun 2008 07:31:47 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.226]) by postgresql.org (Postfix) with ESMTP id D0500650E88 for ; Thu, 26 Jun 2008 07:31:44 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id i31so1360120wxd.28 for ; Thu, 26 Jun 2008 03:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=kiCCst8ZPZjpRbQiTlRF2enb4eIQMcCrknQ0XgQn3Xw=; b=X90TEl644vB28wUVICNGNFPPNqcoztcbsYDIN3AYVAmQEdTMYyTUF+S5CJ9SGGGE5U nuKPXAoR/4MSWqTyKGvXu89g7RmQyo+e74eNDyQno7NUI9U+Ko+fGp9UohMvKXPgb1N3 dymXXA8iA6iOk4qZmG0mJVxwMqiGiQ2V24WLQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=OJCQldcrVNWbEKKqT+5IG5j+SN860duKzccN07CL65IKclmtRQq7LiquHLISzrd63L KtyvFrw4wHvAfbWOS7M7FqpBZe05eD0h+G2tMobbqdCq41crYcYIOFP2RYYX6FEgBJpE M3OAzVaAjVq0GZ3svbvBy5jAFK3l+otcc06i8= Received: by 10.151.112.12 with SMTP id p12mr1600247ybm.195.1214476302988; Thu, 26 Jun 2008 03:31:42 -0700 (PDT) Received: by 10.151.84.7 with HTTP; Thu, 26 Jun 2008 03:31:42 -0700 (PDT) Message-ID: <2e78013d0806260331u3a60bff4yda1fee42688eeea5@mail.gmail.com> Date: Thu, 26 Jun 2008 16:01:42 +0530 From: "Pavan Deolasee" To: jay Subject: =?GB2312?B?UmU6IFtQRVJGT1JNXSC08Li0OiBbUEVSRk9STV0gUG9zdGc=?= =?GB2312?B?cmVzcWwgdXBkYXRlIG9wIGlzIHZlcnkgdmVyeSBzbG93?= Cc: "Heikki Linnakangas" , pgsql-performance@postgresql.org In-Reply-To: <005101c8d773$ff81b2c0$0644000a@hz.ali.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <473587.97248.qm@web32701.mail.mud.yahoo.com> <004b01c8d671$3dec1630$0544000a@hz.ali.com> <486219B6.7050003@enterprisedb.com> <005101c8d773$ff81b2c0$0644000a@hz.ali.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/162 X-Sequence-Number: 30512 2008/6/26 jay : > If we can do commit very 1000 row per round, it may resolve the > problem. > But PG not support transaction within function yet? > Yeah, transaction control is not supported inside functions. There are some hacks using dblink to do transactions inside functions. You may want to check that out. I had suggested another hack in the past for very simplistic updates, when you are sure that the tuple length does not change between updates and you are ready to handle half updated table if there is a crash or failure in between. May be for your case, where you are updating a single column of the entire table and setting it to some default value for all the rows, it may work fine. But please be aware of data consistency issues before you try that. And it must be once in a lifetime kind of hack. http://postgresql-in.blogspot.com/2008/04/postgresql-in-place-update.html Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com