@@ -1037,9 +1037,9 @@ bt_report_duplicate(BtreeCheckState *state,
1037
1037
(errcode (ERRCODE_INDEX_CORRUPTED ),
1038
1038
errmsg ("index uniqueness is violated for index \"%s\"" ,
1039
1039
RelationGetRelationName (state -> rel )),
1040
- errdetail ("Index %s%s and%s%s (point to heap %s and %s) page lsn=%X/%X ." ,
1040
+ errdetail ("Index %s%s and%s%s (point to heap %s and %s) page lsn=%016" PRIX64 " ." ,
1041
1041
itid , pposting , nitid , pnposting , htid , nhtid ,
1042
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
1042
+ state -> targetlsn )));
1043
1043
}
1044
1044
1045
1045
/* Check if current nbtree leaf entry complies with UNIQUE constraint */
@@ -1182,9 +1182,9 @@ bt_leftmost_ignoring_half_dead(BtreeCheckState *state,
1182
1182
(errcode (ERRCODE_NO_DATA ),
1183
1183
errmsg_internal ("harmless interrupted page deletion detected in index \"%s\"" ,
1184
1184
RelationGetRelationName (state -> rel )),
1185
- errdetail_internal ("Block=%u right block=%u page lsn=%X/%X ." ,
1185
+ errdetail_internal ("Block=%u right block=%u page lsn=%016" PRIX64 " ." ,
1186
1186
reached , reached_from ,
1187
- LSN_FORMAT_ARGS ( pagelsn ) )));
1187
+ pagelsn )));
1188
1188
1189
1189
reached_from = reached ;
1190
1190
reached = reached_opaque -> btpo_prev ;
@@ -1407,11 +1407,11 @@ bt_target_page_check(BtreeCheckState *state)
1407
1407
(errcode (ERRCODE_INDEX_CORRUPTED ),
1408
1408
errmsg ("wrong number of high key index tuple attributes in index \"%s\"" ,
1409
1409
RelationGetRelationName (state -> rel )),
1410
- errdetail_internal ("Index block=%u natts=%u block type=%s page lsn=%X/%X ." ,
1410
+ errdetail_internal ("Index block=%u natts=%u block type=%s page lsn=%016" PRIX64 " ." ,
1411
1411
state -> targetblock ,
1412
1412
BTreeTupleGetNAtts (itup , state -> rel ),
1413
1413
P_ISLEAF (topaque ) ? "heap" : "index" ,
1414
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
1414
+ state -> targetlsn )));
1415
1415
}
1416
1416
}
1417
1417
@@ -1456,10 +1456,10 @@ bt_target_page_check(BtreeCheckState *state)
1456
1456
(errcode (ERRCODE_INDEX_CORRUPTED ),
1457
1457
errmsg ("index tuple size does not equal lp_len in index \"%s\"" ,
1458
1458
RelationGetRelationName (state -> rel )),
1459
- errdetail_internal ("Index tid=(%u,%u) tuple size=%zu lp_len=%u page lsn=%X/%X ." ,
1459
+ errdetail_internal ("Index tid=(%u,%u) tuple size=%zu lp_len=%u page lsn=%016" PRIX64 " ." ,
1460
1460
state -> targetblock , offset ,
1461
1461
tupsize , ItemIdGetLength (itemid ),
1462
- LSN_FORMAT_ARGS ( state -> targetlsn ) ),
1462
+ state -> targetlsn ),
1463
1463
errhint ("This could be a torn page problem." )));
1464
1464
1465
1465
/* Check the number of index tuple attributes */
@@ -1480,12 +1480,12 @@ bt_target_page_check(BtreeCheckState *state)
1480
1480
(errcode (ERRCODE_INDEX_CORRUPTED ),
1481
1481
errmsg ("wrong number of index tuple attributes in index \"%s\"" ,
1482
1482
RelationGetRelationName (state -> rel )),
1483
- errdetail_internal ("Index tid=%s natts=%u points to %s tid=%s page lsn=%X/%X ." ,
1483
+ errdetail_internal ("Index tid=%s natts=%u points to %s tid=%s page lsn=%016" PRIX64 " ." ,
1484
1484
itid ,
1485
1485
BTreeTupleGetNAtts (itup , state -> rel ),
1486
1486
P_ISLEAF (topaque ) ? "heap" : "index" ,
1487
1487
htid ,
1488
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
1488
+ state -> targetlsn )));
1489
1489
}
1490
1490
1491
1491
/*
@@ -1530,9 +1530,9 @@ bt_target_page_check(BtreeCheckState *state)
1530
1530
(errcode (ERRCODE_INDEX_CORRUPTED ),
1531
1531
errmsg ("could not find tuple using search from root page in index \"%s\"" ,
1532
1532
RelationGetRelationName (state -> rel )),
1533
- errdetail_internal ("Index tid=%s points to heap tid=%s page lsn=%X/%X ." ,
1533
+ errdetail_internal ("Index tid=%s points to heap tid=%s page lsn=%016" PRIX64 " ." ,
1534
1534
itid , htid ,
1535
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
1535
+ state -> targetlsn )));
1536
1536
}
1537
1537
1538
1538
/*
@@ -1559,9 +1559,9 @@ bt_target_page_check(BtreeCheckState *state)
1559
1559
(errcode (ERRCODE_INDEX_CORRUPTED ),
1560
1560
errmsg_internal ("posting list contains misplaced TID in index \"%s\"" ,
1561
1561
RelationGetRelationName (state -> rel )),
1562
- errdetail_internal ("Index tid=%s posting list offset=%d page lsn=%X/%X ." ,
1562
+ errdetail_internal ("Index tid=%s posting list offset=%d page lsn=%016" PRIX64 " ." ,
1563
1563
itid , i ,
1564
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
1564
+ state -> targetlsn )));
1565
1565
}
1566
1566
1567
1567
ItemPointerCopy (current , & last );
@@ -1613,11 +1613,11 @@ bt_target_page_check(BtreeCheckState *state)
1613
1613
(errcode (ERRCODE_INDEX_CORRUPTED ),
1614
1614
errmsg ("index row size %zu exceeds maximum for index \"%s\"" ,
1615
1615
tupsize , RelationGetRelationName (state -> rel )),
1616
- errdetail_internal ("Index tid=%s points to %s tid=%s page lsn=%X/%X ." ,
1616
+ errdetail_internal ("Index tid=%s points to %s tid=%s page lsn=%016" PRIX64 " ." ,
1617
1617
itid ,
1618
1618
P_ISLEAF (topaque ) ? "heap" : "index" ,
1619
1619
htid ,
1620
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
1620
+ state -> targetlsn )));
1621
1621
}
1622
1622
1623
1623
/* Fingerprint leaf page tuples (those that point to the heap) */
@@ -1720,11 +1720,11 @@ bt_target_page_check(BtreeCheckState *state)
1720
1720
(errcode (ERRCODE_INDEX_CORRUPTED ),
1721
1721
errmsg ("high key invariant violated for index \"%s\"" ,
1722
1722
RelationGetRelationName (state -> rel )),
1723
- errdetail_internal ("Index tid=%s points to %s tid=%s page lsn=%X/%X ." ,
1723
+ errdetail_internal ("Index tid=%s points to %s tid=%s page lsn=%016" PRIX64 " ." ,
1724
1724
itid ,
1725
1725
P_ISLEAF (topaque ) ? "heap" : "index" ,
1726
1726
htid ,
1727
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
1727
+ state -> targetlsn )));
1728
1728
}
1729
1729
/* Reset, in case scantid was set to (itup) posting tuple's max TID */
1730
1730
skey -> scantid = scantid ;
@@ -1768,14 +1768,14 @@ bt_target_page_check(BtreeCheckState *state)
1768
1768
RelationGetRelationName (state -> rel )),
1769
1769
errdetail_internal ("Lower index tid=%s (points to %s tid=%s) "
1770
1770
"higher index tid=%s (points to %s tid=%s) "
1771
- "page lsn=%X/%X ." ,
1771
+ "page lsn=%016" PRIX64 " ." ,
1772
1772
itid ,
1773
1773
P_ISLEAF (topaque ) ? "heap" : "index" ,
1774
1774
htid ,
1775
1775
nitid ,
1776
1776
P_ISLEAF (topaque ) ? "heap" : "index" ,
1777
1777
nhtid ,
1778
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
1778
+ state -> targetlsn )));
1779
1779
}
1780
1780
1781
1781
/*
@@ -1885,9 +1885,9 @@ bt_target_page_check(BtreeCheckState *state)
1885
1885
(errcode (ERRCODE_INDEX_CORRUPTED ),
1886
1886
errmsg ("cross page item order invariant violated for index \"%s\"" ,
1887
1887
RelationGetRelationName (state -> rel )),
1888
- errdetail_internal ("Last item on page tid=(%u,%u) page lsn=%X/%X ." ,
1888
+ errdetail_internal ("Last item on page tid=(%u,%u) page lsn=%016" PRIX64 " ." ,
1889
1889
state -> targetblock , offset ,
1890
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
1890
+ state -> targetlsn )));
1891
1891
}
1892
1892
1893
1893
/*
@@ -1938,9 +1938,9 @@ bt_target_page_check(BtreeCheckState *state)
1938
1938
(errcode (ERRCODE_INDEX_CORRUPTED ),
1939
1939
errmsg ("right block of leaf block is non-leaf for index \"%s\"" ,
1940
1940
RelationGetRelationName (state -> rel )),
1941
- errdetail_internal ("Block=%u page lsn=%X/%X ." ,
1941
+ errdetail_internal ("Block=%u page lsn=%016" PRIX64 " ." ,
1942
1942
state -> targetblock ,
1943
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
1943
+ state -> targetlsn )));
1944
1944
1945
1945
itemid = PageGetItemIdCareful (state , rightblock_number ,
1946
1946
rightpage ,
@@ -2362,9 +2362,9 @@ bt_child_highkey_check(BtreeCheckState *state,
2362
2362
(errcode (ERRCODE_INDEX_CORRUPTED ),
2363
2363
errmsg ("the first child of leftmost target page is not leftmost of its level in index \"%s\"" ,
2364
2364
RelationGetRelationName (state -> rel )),
2365
- errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X ." ,
2365
+ errdetail_internal ("Target block=%u child block=%u target page lsn=%016" PRIX64 " ." ,
2366
2366
state -> targetblock , blkno ,
2367
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
2367
+ state -> targetlsn )));
2368
2368
2369
2369
/* Do level sanity check */
2370
2370
if ((!P_ISDELETED (opaque ) || P_HAS_FULLXID (opaque )) &&
@@ -2448,9 +2448,9 @@ bt_child_highkey_check(BtreeCheckState *state,
2448
2448
(errcode (ERRCODE_INDEX_CORRUPTED ),
2449
2449
errmsg ("child high key is greater than rightmost pivot key on target level in index \"%s\"" ,
2450
2450
RelationGetRelationName (state -> rel )),
2451
- errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X ." ,
2451
+ errdetail_internal ("Target block=%u child block=%u target page lsn=%016" PRIX64 " ." ,
2452
2452
state -> targetblock , blkno ,
2453
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
2453
+ state -> targetlsn )));
2454
2454
pivotkey_offset = P_HIKEY ;
2455
2455
}
2456
2456
itemid = PageGetItemIdCareful (state , state -> targetblock ,
@@ -2478,9 +2478,9 @@ bt_child_highkey_check(BtreeCheckState *state,
2478
2478
(errcode (ERRCODE_INDEX_CORRUPTED ),
2479
2479
errmsg ("can't find left sibling high key in index \"%s\"" ,
2480
2480
RelationGetRelationName (state -> rel )),
2481
- errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X ." ,
2481
+ errdetail_internal ("Target block=%u child block=%u target page lsn=%016" PRIX64 " ." ,
2482
2482
state -> targetblock , blkno ,
2483
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
2483
+ state -> targetlsn )));
2484
2484
itup = state -> lowkey ;
2485
2485
}
2486
2486
@@ -2490,9 +2490,9 @@ bt_child_highkey_check(BtreeCheckState *state,
2490
2490
(errcode (ERRCODE_INDEX_CORRUPTED ),
2491
2491
errmsg ("mismatch between parent key and child high key in index \"%s\"" ,
2492
2492
RelationGetRelationName (state -> rel )),
2493
- errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X ." ,
2493
+ errdetail_internal ("Target block=%u child block=%u target page lsn=%016" PRIX64 " ." ,
2494
2494
state -> targetblock , blkno ,
2495
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
2495
+ state -> targetlsn )));
2496
2496
}
2497
2497
}
2498
2498
@@ -2630,9 +2630,9 @@ bt_child_check(BtreeCheckState *state, BTScanInsert targetkey,
2630
2630
(errcode (ERRCODE_INDEX_CORRUPTED ),
2631
2631
errmsg ("downlink to deleted page found in index \"%s\"" ,
2632
2632
RelationGetRelationName (state -> rel )),
2633
- errdetail_internal ("Parent block=%u child block=%u parent page lsn=%X/%X ." ,
2633
+ errdetail_internal ("Parent block=%u child block=%u parent page lsn=%016" PRIX64 " ." ,
2634
2634
state -> targetblock , childblock ,
2635
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
2635
+ state -> targetlsn )));
2636
2636
2637
2637
for (offset = P_FIRSTDATAKEY (copaque );
2638
2638
offset <= maxoffset ;
@@ -2671,9 +2671,9 @@ bt_child_check(BtreeCheckState *state, BTScanInsert targetkey,
2671
2671
(errcode (ERRCODE_INDEX_CORRUPTED ),
2672
2672
errmsg ("down-link lower bound invariant violated for index \"%s\"" ,
2673
2673
RelationGetRelationName (state -> rel )),
2674
- errdetail_internal ("Parent block=%u child index tid=(%u,%u) parent page lsn=%X/%X ." ,
2674
+ errdetail_internal ("Parent block=%u child index tid=(%u,%u) parent page lsn=%016" PRIX64 " ." ,
2675
2675
state -> targetblock , childblock , offset ,
2676
- LSN_FORMAT_ARGS ( state -> targetlsn ) )));
2676
+ state -> targetlsn )));
2677
2677
}
2678
2678
2679
2679
pfree (child );
@@ -2741,10 +2741,10 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
2741
2741
(errcode (ERRCODE_NO_DATA ),
2742
2742
errmsg_internal ("harmless interrupted page split detected in index \"%s\"" ,
2743
2743
RelationGetRelationName (state -> rel )),
2744
- errdetail_internal ("Block=%u level=%u left sibling=%u page lsn=%X/%X ." ,
2744
+ errdetail_internal ("Block=%u level=%u left sibling=%u page lsn=%016" PRIX64 " ." ,
2745
2745
blkno , opaque -> btpo_level ,
2746
2746
opaque -> btpo_prev ,
2747
- LSN_FORMAT_ARGS ( pagelsn ) )));
2747
+ pagelsn )));
2748
2748
return ;
2749
2749
}
2750
2750
@@ -2763,9 +2763,9 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
2763
2763
(errcode (ERRCODE_INDEX_CORRUPTED ),
2764
2764
errmsg ("leaf index block lacks downlink in index \"%s\"" ,
2765
2765
RelationGetRelationName (state -> rel )),
2766
- errdetail_internal ("Block=%u page lsn=%X/%X ." ,
2766
+ errdetail_internal ("Block=%u page lsn=%016" PRIX64 " ." ,
2767
2767
blkno ,
2768
- LSN_FORMAT_ARGS ( pagelsn ) )));
2768
+ pagelsn )));
2769
2769
2770
2770
/* Descend from the given page, which is an internal page */
2771
2771
elog (DEBUG1 , "checking for interrupted multi-level deletion due to missing downlink in index \"%s\"" ,
@@ -2829,9 +2829,9 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
2829
2829
(errcode (ERRCODE_INDEX_CORRUPTED ),
2830
2830
errmsg_internal ("downlink to deleted leaf page found in index \"%s\"" ,
2831
2831
RelationGetRelationName (state -> rel )),
2832
- errdetail_internal ("Top parent/target block=%u leaf block=%u top parent/under check lsn=%X/%X ." ,
2832
+ errdetail_internal ("Top parent/target block=%u leaf block=%u top parent/under check lsn=%016" PRIX64 " ." ,
2833
2833
blkno , childblk ,
2834
- LSN_FORMAT_ARGS ( pagelsn ) )));
2834
+ pagelsn )));
2835
2835
2836
2836
/*
2837
2837
* Iff leaf page is half-dead, its high key top parent link should point
@@ -2855,9 +2855,9 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
2855
2855
(errcode (ERRCODE_INDEX_CORRUPTED ),
2856
2856
errmsg ("internal index block lacks downlink in index \"%s\"" ,
2857
2857
RelationGetRelationName (state -> rel )),
2858
- errdetail_internal ("Block=%u level=%u page lsn=%X/%X ." ,
2858
+ errdetail_internal ("Block=%u level=%u page lsn=%016" PRIX64 " ." ,
2859
2859
blkno , opaque -> btpo_level ,
2860
- LSN_FORMAT_ARGS ( pagelsn ) )));
2860
+ pagelsn )));
2861
2861
}
2862
2862
2863
2863
/*
0 commit comments