Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key
Date
Msg-id 23434.1520537159@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] Restrict concurrent update/delete with UPDATE ofpartition key  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On March 8, 2018 10:46:53 AM PST, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Breaking fundamental invariants like
>> "ctid points to this tuple or its update successor" is going to cause
>> trouble.  There's a lot of code that knows that; more than knows the
>> details of what's in xmax, I believe.

> I don't think this is that big a problem. All code already needs to handle the case where ctid points to an aborted
updatetuple. Which might long have been replaced by as an independent role. That's why we have all this updated.xmax ==
new.xminchecks. Which will, without any changes, catch the proposed scheme, no? 

No.  In those situations, the conclusion is that the current tuple is
live, which is exactly the wrong conclusion for a cross-partition update.
Or at least it might be the wrong conclusion ... I wonder how this patch
works if the updating transaction aborted.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Claudio Freire
Date:
Subject: Re: disable SSL compression?
Next
From: Robert Haas
Date:
Subject: Re: parallel append vs. simple UNION ALL