pgsql: Relax overly strict sanity check for upgraded ancient databases

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Relax overly strict sanity check for upgraded ancient databases
Date: 2018-03-01 21:11:18
Message-ID: E1erVTy-0005Lh-8M@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Relax overly strict sanity check for upgraded ancient databases

Commit 4800f16a7ad0 added some sanity checks to ensure we don't
accidentally corrupt data, but in one of them we failed to consider the
effects of a database upgraded from 9.2 or earlier, where a tuple
exclusively locked prior to the upgrade has a slightly different bit
pattern. Fix that by using the macro that we fixed in commit
74ebba84aeb6 for similar situations.

Reported-by: Alexandre Garcia
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/CAPYLKR6yxV4=pfW0Gwij7aPNiiPx+3ib4USVYnbuQdUtmkMaEA@mail.gmail.com

Andres suspects that this bug may have wider ranging consequences, but I
couldn't find anything.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/477ad05e165c15dc9241376f0fce9664063cff46

Modified Files
--------------
src/backend/access/heap/heapam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2018-03-01 21:24:12 pgsql: Use ereport not elog for some corrupt-HOT-chain reports.
Previous Message Tom Lane 2018-03-01 20:35:15 pgsql: Fix IOS planning when only some index columns can return an attr