Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 44FFC9F9F0E; Fri, 1 Dec 2006 14:47:11 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 55482-04; Fri, 1 Dec 2006 14:47:03 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 8ED299FA17A; Fri, 1 Dec 2006 14:47:03 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kB1IkvMC001129; Fri, 1 Dec 2006 13:46:58 -0500 (EST) To: "Heikki Linnakangas" cc: "Alvaro Herrera" , "Simon Riggs" , pgsql-hackers@postgresql.org, pgsql-core@postgresql.org Subject: Re: FOR SHARE vs FOR UPDATE locks In-reply-to: <45706A77.8030503@enterprisedb.com> 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> Comments: In-reply-to "Heikki Linnakangas" message dated "Fri, 01 Dec 2006 17:46:31 +0000" Date: Fri, 01 Dec 2006 13:46:57 -0500 Message-ID: <1128.1164998817@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/32 X-Sequence-Number: 94513 "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. I'm also realizing that a fix along the throw-an-error line is nontrivial, eg, HeapTupleSatisfiesUpdate would need another return code. So at this point we are facing three options: - throw in a large and poorly tested "fix" at the last moment; - postpone 8.2 until we can think of a real fix, which might be a major undertaking; - ship 8.2 with the same behavior 8.0 and 8.1 had. None of these are very attractive, but I'm starting to think the last is the least bad. regards, tom lane