Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Td13z-00053d-S4 for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Nov 2012 15:57:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Td13z-0000aY-9f for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Nov 2012 15:57:39 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Td13y-0000aT-8P for pgsql-hackers@postgresql.org; Mon, 26 Nov 2012 15:57:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Td13v-0006Qt-QG for pgsql-hackers@postgresql.org; Mon, 26 Nov 2012 15:57:37 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qAQFtlEc012290; Mon, 26 Nov 2012 10:55:47 -0500 (EST) From: Tom Lane To: Simon Riggs cc: Robert Haas , Tomas Vondra , Thom Brown , pgsql-hackers@postgresql.org Subject: Re: change in LOCK behavior In-reply-to: References: <5075D8DF.6050500@fuzzy.cz> <5075DFC2.9090306@fuzzy.cz> <12761.1349910622@sss.pgh.pa.us> <14951.1349916214@sss.pgh.pa.us> <19901.1349974420@sss.pgh.pa.us> <21922.1349976162@sss.pgh.pa.us> <25607.1349984584@sss.pgh.pa.us> Comments: In-reply-to Simon Riggs message dated "Thu, 11 Oct 2012 20:47:56 +0100" Date: Mon, 26 Nov 2012 10:55:47 -0500 Message-ID: <12289.1353945347@sss.pgh.pa.us> X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Simon Riggs writes: > On 11 October 2012 20:43, Tom Lane wrote: >> Robert Haas writes: >>> So we have to take the snapshot before you begin execution, but it >>> seems that to avoid surprising behavior we also have to take it after >>> acquiring locks. And it looks like locking is intertwined with a >>> bunch of other parse analysis tasks that might require a snapshot to >>> have been taken first. Whee. >> Yeah. I think that a good solution to this would involve guaranteeing >> that the execution snapshot is not taken until we have all locks that >> are going to be taken on the tables. Which is likely to involve a fair >> amount of refactoring, though I admit I've not looked at details. >> >> In any case, it's a mistake to think about this in isolation. If we're >> going to do something about redefining SnapshotNow to avoid its race >> conditions, that's going to move the goalposts quite a lot. >> >> Anyway, my feeling about it is that I don't want 9.2 to have an >> intermediate behavior between the historical one and whatever we end up >> designing to satisfy these concerns. That's why I'm pressing for >> reversion and not a band-aid fix in 9.2. I certainly hope we can do >> better going forward, but this is not looking like whatever we come up >> with would be sane to back-patch. > Agreed, please revert. We have to do something about this one way or another before we can ship 9.2.2. Is the consensus to revert this patch: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=d573e239f03506920938bf0be56c868d9c3416da and if so, who's going to do the deed? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers