@@ -1078,8 +1078,7 @@ bt_target_page_check(BtreeCheckState *state)
1078
1078
state -> targetblock ,
1079
1079
BTreeTupleGetNAtts (itup , state -> rel ),
1080
1080
P_ISLEAF (topaque ) ? "heap" : "index" ,
1081
- (uint32 ) (state -> targetlsn >> 32 ),
1082
- (uint32 ) state -> targetlsn )));
1081
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
1083
1082
}
1084
1083
}
1085
1084
@@ -1120,8 +1119,7 @@ bt_target_page_check(BtreeCheckState *state)
1120
1119
errdetail_internal ("Index tid=(%u,%u) tuple size=%zu lp_len=%u page lsn=%X/%X." ,
1121
1120
state -> targetblock , offset ,
1122
1121
tupsize , ItemIdGetLength (itemid ),
1123
- (uint32 ) (state -> targetlsn >> 32 ),
1124
- (uint32 ) state -> targetlsn ),
1122
+ LSN_FORMAT_ARGS (state -> targetlsn )),
1125
1123
errhint ("This could be a torn page problem." )));
1126
1124
1127
1125
/* Check the number of index tuple attributes */
@@ -1147,8 +1145,7 @@ bt_target_page_check(BtreeCheckState *state)
1147
1145
BTreeTupleGetNAtts (itup , state -> rel ),
1148
1146
P_ISLEAF (topaque ) ? "heap" : "index" ,
1149
1147
htid ,
1150
- (uint32 ) (state -> targetlsn >> 32 ),
1151
- (uint32 ) state -> targetlsn )));
1148
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
1152
1149
}
1153
1150
1154
1151
/*
@@ -1195,8 +1192,7 @@ bt_target_page_check(BtreeCheckState *state)
1195
1192
RelationGetRelationName (state -> rel )),
1196
1193
errdetail_internal ("Index tid=%s points to heap tid=%s page lsn=%X/%X." ,
1197
1194
itid , htid ,
1198
- (uint32 ) (state -> targetlsn >> 32 ),
1199
- (uint32 ) state -> targetlsn )));
1195
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
1200
1196
}
1201
1197
1202
1198
/*
@@ -1225,8 +1221,7 @@ bt_target_page_check(BtreeCheckState *state)
1225
1221
RelationGetRelationName (state -> rel )),
1226
1222
errdetail_internal ("Index tid=%s posting list offset=%d page lsn=%X/%X." ,
1227
1223
itid , i ,
1228
- (uint32 ) (state -> targetlsn >> 32 ),
1229
- (uint32 ) state -> targetlsn )));
1224
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
1230
1225
}
1231
1226
1232
1227
ItemPointerCopy (current , & last );
@@ -1282,8 +1277,7 @@ bt_target_page_check(BtreeCheckState *state)
1282
1277
itid ,
1283
1278
P_ISLEAF (topaque ) ? "heap" : "index" ,
1284
1279
htid ,
1285
- (uint32 ) (state -> targetlsn >> 32 ),
1286
- (uint32 ) state -> targetlsn )));
1280
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
1287
1281
}
1288
1282
1289
1283
/* Fingerprint leaf page tuples (those that point to the heap) */
@@ -1390,8 +1384,7 @@ bt_target_page_check(BtreeCheckState *state)
1390
1384
itid ,
1391
1385
P_ISLEAF (topaque ) ? "heap" : "index" ,
1392
1386
htid ,
1393
- (uint32 ) (state -> targetlsn >> 32 ),
1394
- (uint32 ) state -> targetlsn )));
1387
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
1395
1388
}
1396
1389
/* Reset, in case scantid was set to (itup) posting tuple's max TID */
1397
1390
skey -> scantid = scantid ;
@@ -1442,8 +1435,7 @@ bt_target_page_check(BtreeCheckState *state)
1442
1435
nitid ,
1443
1436
P_ISLEAF (topaque ) ? "heap" : "index" ,
1444
1437
nhtid ,
1445
- (uint32 ) (state -> targetlsn >> 32 ),
1446
- (uint32 ) state -> targetlsn )));
1438
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
1447
1439
}
1448
1440
1449
1441
/*
@@ -1500,8 +1492,7 @@ bt_target_page_check(BtreeCheckState *state)
1500
1492
RelationGetRelationName (state -> rel )),
1501
1493
errdetail_internal ("Last item on page tid=(%u,%u) page lsn=%X/%X." ,
1502
1494
state -> targetblock , offset ,
1503
- (uint32 ) (state -> targetlsn >> 32 ),
1504
- (uint32 ) state -> targetlsn )));
1495
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
1505
1496
}
1506
1497
}
1507
1498
@@ -1907,8 +1898,7 @@ bt_child_highkey_check(BtreeCheckState *state,
1907
1898
RelationGetRelationName (state -> rel )),
1908
1899
errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X." ,
1909
1900
state -> targetblock , blkno ,
1910
- (uint32 ) (state -> targetlsn >> 32 ),
1911
- (uint32 ) state -> targetlsn )));
1901
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
1912
1902
1913
1903
/* Check level for non-ignorable page */
1914
1904
if (!P_IGNORE (opaque ) && opaque -> btpo .level != target_level - 1 )
@@ -1993,8 +1983,7 @@ bt_child_highkey_check(BtreeCheckState *state,
1993
1983
RelationGetRelationName (state -> rel )),
1994
1984
errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X." ,
1995
1985
state -> targetblock , blkno ,
1996
- (uint32 ) (state -> targetlsn >> 32 ),
1997
- (uint32 ) state -> targetlsn )));
1986
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
1998
1987
pivotkey_offset = P_HIKEY ;
1999
1988
}
2000
1989
itemid = PageGetItemIdCareful (state , state -> targetblock ,
@@ -2024,8 +2013,7 @@ bt_child_highkey_check(BtreeCheckState *state,
2024
2013
RelationGetRelationName (state -> rel )),
2025
2014
errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X." ,
2026
2015
state -> targetblock , blkno ,
2027
- (uint32 ) (state -> targetlsn >> 32 ),
2028
- (uint32 ) state -> targetlsn )));
2016
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
2029
2017
itup = state -> lowkey ;
2030
2018
}
2031
2019
@@ -2037,8 +2025,7 @@ bt_child_highkey_check(BtreeCheckState *state,
2037
2025
RelationGetRelationName (state -> rel )),
2038
2026
errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X." ,
2039
2027
state -> targetblock , blkno ,
2040
- (uint32 ) (state -> targetlsn >> 32 ),
2041
- (uint32 ) state -> targetlsn )));
2028
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
2042
2029
}
2043
2030
}
2044
2031
@@ -2178,8 +2165,7 @@ bt_child_check(BtreeCheckState *state, BTScanInsert targetkey,
2178
2165
RelationGetRelationName (state -> rel )),
2179
2166
errdetail_internal ("Parent block=%u child block=%u parent page lsn=%X/%X." ,
2180
2167
state -> targetblock , childblock ,
2181
- (uint32 ) (state -> targetlsn >> 32 ),
2182
- (uint32 ) state -> targetlsn )));
2168
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
2183
2169
2184
2170
for (offset = P_FIRSTDATAKEY (copaque );
2185
2171
offset <= maxoffset ;
@@ -2220,8 +2206,7 @@ bt_child_check(BtreeCheckState *state, BTScanInsert targetkey,
2220
2206
RelationGetRelationName (state -> rel )),
2221
2207
errdetail_internal ("Parent block=%u child index tid=(%u,%u) parent page lsn=%X/%X." ,
2222
2208
state -> targetblock , childblock , offset ,
2223
- (uint32 ) (state -> targetlsn >> 32 ),
2224
- (uint32 ) state -> targetlsn )));
2209
+ LSN_FORMAT_ARGS (state -> targetlsn ))));
2225
2210
}
2226
2211
2227
2212
pfree (child );
@@ -2292,8 +2277,7 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
2292
2277
errdetail_internal ("Block=%u level=%u left sibling=%u page lsn=%X/%X." ,
2293
2278
blkno , opaque -> btpo .level ,
2294
2279
opaque -> btpo_prev ,
2295
- (uint32 ) (pagelsn >> 32 ),
2296
- (uint32 ) pagelsn )));
2280
+ LSN_FORMAT_ARGS (pagelsn ))));
2297
2281
return ;
2298
2282
}
2299
2283
@@ -2314,8 +2298,7 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
2314
2298
RelationGetRelationName (state -> rel )),
2315
2299
errdetail_internal ("Block=%u page lsn=%X/%X." ,
2316
2300
blkno ,
2317
- (uint32 ) (pagelsn >> 32 ),
2318
- (uint32 ) pagelsn )));
2301
+ LSN_FORMAT_ARGS (pagelsn ))));
2319
2302
2320
2303
/* Descend from the given page, which is an internal page */
2321
2304
elog (DEBUG1 , "checking for interrupted multi-level deletion due to missing downlink in index \"%s\"" ,
@@ -2381,8 +2364,7 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
2381
2364
RelationGetRelationName (state -> rel )),
2382
2365
errdetail_internal ("Top parent/target block=%u leaf block=%u top parent/under check lsn=%X/%X." ,
2383
2366
blkno , childblk ,
2384
- (uint32 ) (pagelsn >> 32 ),
2385
- (uint32 ) pagelsn )));
2367
+ LSN_FORMAT_ARGS (pagelsn ))));
2386
2368
2387
2369
/*
2388
2370
* Iff leaf page is half-dead, its high key top parent link should point
@@ -2408,8 +2390,7 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
2408
2390
RelationGetRelationName (state -> rel )),
2409
2391
errdetail_internal ("Block=%u level=%u page lsn=%X/%X." ,
2410
2392
blkno , opaque -> btpo .level ,
2411
- (uint32 ) (pagelsn >> 32 ),
2412
- (uint32 ) pagelsn )));
2393
+ LSN_FORMAT_ARGS (pagelsn ))));
2413
2394
}
2414
2395
2415
2396
/*
0 commit comments