Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 9D4DA9FA12B for ; Fri, 1 Dec 2006 16:12:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 12639-10 for ; Fri, 1 Dec 2006 16:12:02 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by postgresql.org (Postfix) with ESMTP id 6A34E9FA17A for ; Fri, 1 Dec 2006 16:12:01 -0400 (AST) Received: by ug-out-1314.google.com with SMTP id k3so2277527ugf for ; Fri, 01 Dec 2006 12:12:00 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oE8CmVVHTQDuW8Jfn/HG5OLuf+I7WYg6e7OzLO/cJkvRCh0rJglbwZYsxtaVrQJiEfZHnDwBZYTrxc4TvsPF72ux4jG3nWJzNZuaUh5OaGPJdO8hTg+ISBfyTBi8mn5/9FC136jlQiwFMZKfnl0YxjN4fBsemzhbHsta0CD+LbM= Received: by 10.78.164.13 with SMTP id m13mr5201610hue.1165003919744; Fri, 01 Dec 2006 12:11:59 -0800 (PST) Received: by 10.78.35.18 with HTTP; Fri, 1 Dec 2006 12:11:59 -0800 (PST) Message-ID: Date: Fri, 1 Dec 2006 15:11:59 -0500 From: "Merlin Moncure" To: "Tom Lane" Subject: Re: FOR SHARE vs FOR UPDATE locks Cc: "Heikki Linnakangas" , "Alvaro Herrera" , "Simon Riggs" , pgsql-hackers@postgresql.org, pgsql-core@postgresql.org In-Reply-To: <1128.1164998817@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1144.1164924373@sss.pgh.pa.us> <1164962544.3778.847.camel@silverbirch.site> <20061201113711.GC30441@alvh.no-ip.org> <15834.1164985926@sss.pgh.pa.us> <45705E9C.2060003@enterprisedb.com> <534.1164994846@sss.pgh.pa.us> <45706A77.8030503@enterprisedb.com> <1128.1164998817@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/40 X-Sequence-Number: 94521 On 12/1/06, Tom Lane wrote: > "Heikki Linnakangas" writes: > > Let's throw an error for now. We have to come back to this in 8.3, I think. > > After further thought I think we should also seriously consider plan C: > do nothing for now. We now realize that there have been related bugs > since 8.0, namely that > > begin; > select some rows for update; > savepoint x; > update the same rows; > rollback to x; > > leaves the tuple(s) not locked. The lack of complaints about this from > the field suggests that this isn't a huge problem in practice. If we > do make it throw an error I'm afraid that we will break applications > that aren't having a problem at the moment. imo, the most likely scenario would be a begin/exception/end block in pg/sql. i would venture to guess that very little true savepointing happens in practice. maybe add a little note of caution pg/sql error handling documentation? merlin