Re: posgres 12 bug (partitioned table) - Mailing list pgsql-bugs

From Andres Freund
Subject Re: posgres 12 bug (partitioned table)
Date
Msg-id 20200811190139.qvbbxhycexqnmogx@alap3.anarazel.de
Whole thread Raw
In response to Re: posgres 12 bug (partitioned table)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Hi,

On 2020-08-11 21:55:32 +0300, Pavel Biryukov wrote:
> I don't see a problem with "wrapping around" - the row's xmin does not change
> with freeze (AFAIK). It changes when the row is modified.
> So event if you hold some entity (with current xmin) for a long time (enough
> for "wrap around") and then try to update it, it will update ok.

The problem isn't that it won't update ok, it is that it might update
despite there being another update since the RETURNING xmin.
s1) BEGIN;INSERT ... RETURN xmin;COMMIT;
s2) BEGIN;UPDATE .. WHERE xmin ...; COMMIT;
s*) WRAPAROUND;
s1) BEGIN;UPDATE .. WHERE xmin ...; COMMIT;

this could lead to s1 not noticing that s2 was updated.

- Andres



pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: posgres 12 bug (partitioned table)
Next
From: Amit Langote
Date:
Subject: Re: posgres 12 bug (partitioned table)