Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D9CF1650F00 for ; Thu, 26 Jun 2008 13:00:39 -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 56628-01 for ; Thu, 26 Jun 2008 13:00:13 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by postgresql.org (Postfix) with ESMTP id DF34A650F2A for ; Thu, 26 Jun 2008 12:59:59 -0300 (ADT) Received: by yx-out-2324.google.com with SMTP id 8so43700yxb.73 for ; Thu, 26 Jun 2008 08:59:58 -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=tkFk+5L9GVPl3GF5aTJECoaiAyJVNAbIU/zchiZNuoo=; b=mgxCsE7YTkMRI/Vvmk1p8LUTwbjJC37qVWlPSr9CbsjC9Mjk6te+40igDw05SVhw9V nWdJdMQqm435lbQSknMxin79PrIeQRsOgsY4bZsP4LR60nTmnMEns2E8cQPF86raxBQl +pSQAXJ2p98rIQMdQ2Ax0TIDaWdmTHveLTqu0= 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=DVj72ZIYvG+ugLvUDx0SRa9U4uRLe6nuarYzh0KrDQnsGAqQIKMGOT3slz7OllAVCw 0UzQRBHZSn9vqBUuiZOA3xaJl1BrErCotNJGrGLXXrKwBFSmdg/YJIirJg+UnhRUG6Bg IKeVOUNG1MVjmXSR1ldrlk0+kdCMc+h+WEGtA= Received: by 10.115.58.1 with SMTP id l1mr137017wak.27.1214495993914; Thu, 26 Jun 2008 08:59:53 -0700 (PDT) Received: by 10.114.180.17 with HTTP; Thu, 26 Jun 2008 08:59:53 -0700 (PDT) Message-ID: Date: Thu, 26 Jun 2008 09:59:53 -0600 From: "Scott Marlowe" To: "Pavan Deolasee" Subject: =?GB2312?B?UmU6IFtQRVJGT1JNXSBSZTogW1BFUkZPUk1dILTwuLQ6IFtQRVJGT1JN?= =?GB2312?B?XSBQb3N0Z3Jlc3FsIHVwZGF0ZSBvcCBpcyB2ZXJ5IHZlcnkgc2xvdw==?= Cc: jay , "Heikki Linnakangas" , pgsql-performance@postgresql.org In-Reply-To: <2e78013d0806260331u3a60bff4yda1fee42688eeea5@mail.gmail.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> <2e78013d0806260331u3a60bff4yda1fee42688eeea5@mail.gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200806/174 X-Sequence-Number: 30524 2008/6/26 Pavan Deolasee : > 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. If you need autonomous transactions. For most people save points and catching seem to be a n acceptable form of transaction control. > 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 In a way that's what pg_bulkloader does.