Re: posgres 12 bug (partitioned table)

From: Andres Freund <andres(at)anarazel(dot)de>
To: Pavel Biryukov <79166341370(at)yandex(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: posgres 12 bug (partitioned table)
Date: 2020-08-11 19:01:39
Message-ID: 20200811190139.qvbbxhycexqnmogx@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2020-08-12 03:51:35 Re: posgres 12 bug (partitioned table)
Previous Message Pavel Biryukov 2020-08-11 18:59:18 Re: posgres 12 bug (partitioned table)

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Wong 2020-08-11 20:01:10 Re: doc examples for pghandler
Previous Message Pavel Biryukov 2020-08-11 18:59:18 Re: posgres 12 bug (partitioned table)