Re: Update with subselect sometimes returns wrong result - Mailing list pgsql-bugs

From Andres Freund
Subject Re: Update with subselect sometimes returns wrong result
Date
Msg-id 20131201081919.GF18793@alap2.anarazel.de
Whole thread Raw
In response to Re: Update with subselect sometimes returns wrong result  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Update with subselect sometimes returns wrong result  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Update with subselect sometimes returns wrong result
Next
From: Andres Freund
Date:
Subject: Re: Update with subselect sometimes returns wrong result