Content-Length: 262105 | pFad | http://github.com/postgrespro/postgres/commit/477ad05e165c15dc9241376f0fce9664063cff46

95 Relax overly strict sanity check for upgraded ancient databases · postgrespro/postgres@477ad05 · GitHub
Skip to content

Commit 477ad05

Browse files
committed
Relax overly strict sanity check for upgraded ancient databases
Commit 4800f16 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 74ebba8 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.
1 parent b5febc1 commit 477ad05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/access/heap/heapam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6799,7 +6799,7 @@ heap_prepare_freeze_tuple(HeapTupleHeader tuple,
67996799
* independent of committedness, since a committed lock holder has
68006800
* released the lock).
68016801
*/
6802-
if (!(tuple->t_infomask & HEAP_XMAX_LOCK_ONLY) &&
6802+
if (!HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask) &&
68036803
TransactionIdDidCommit(xid))
68046804
ereport(ERROR,
68056805
(errcode(ERRCODE_DATA_CORRUPTED),

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/477ad05e165c15dc9241376f0fce9664063cff46

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy