Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vn2FT-0006bA-KZ for pgsql-bugs@arkaria.postgresql.org; Sun, 01 Dec 2013 08:19:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vn2FS-00018O-Uz for pgsql-bugs@arkaria.postgresql.org; Sun, 01 Dec 2013 08:19:27 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vn2FR-00018H-U6 for pgsql-bugs@postgresql.org; Sun, 01 Dec 2013 08:19:26 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vn2FP-0004t1-0d for pgsql-bugs@postgresql.org; Sun, 01 Dec 2013 08:19:25 +0000 Received: from intern.anarazel.de (p5DDC7DD4.dip0.t-ipconnect.de [93.220.125.212]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id AA81D4E8003; Sun, 1 Dec 2013 09:19:20 +0100 (CET) Date: Sun, 1 Dec 2013 09:19:19 +0100 From: Andres Freund To: Tom Lane Cc: Oliver Seemann , pgsql-bugs@postgresql.org Subject: Re: Update with subselect sometimes returns wrong result Message-ID: <20131201081919.GF18793@alap2.anarazel.de> References: <25601.1385834264@sss.pgh.pa.us> <20131130214018.GJ31100@awork2.anarazel.de> <22220.1385880062@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <22220.1385880062@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2013-12-01 01:41:02 -0500, Tom Lane wrote: > Now, the thing about this is that the tuple heap_lock_tuple is rejecting > in the second pass is the one that we just updated, up at the ModifyTable > plan node. So I can't find it exactly surprising that it says > HeapTupleSelfUpdated. But tracing through tqual.c shows that the tuple > has got the HEAP_XMAX_IS_MULTI bit set, which might be thought a bit > peculiar. There's not multiple transactions involved. Hm. Haven't looked at that, but if so that seems like an independent bug. > Anyway, it seems pretty clear that the explanation is down somewhere in > the tuple visibility and multixact logic that you and Alvaro have been > hacking on with such vim lately. I'm out of steam for tonight, over > to you ... Will look at it for a bit, but I kinda doubt the multixact logic is, especially anything we've changed, overly much involved. It's reproducing on 9.1 after all. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs