@@ -1078,8 +1078,7 @@ bt_target_page_check(BtreeCheckState *state)
10781078 state -> targetblock ,
10791079 BTreeTupleGetNAtts (itup , state -> rel ),
10801080 P_ISLEAF (topaque ) ? "heap" : "index" ,
1081- (uint32 ) (state -> targetlsn >> 32 ),
1082- (uint32 ) state -> targetlsn )));
1081+ LSN_FORMAT_ARGS (state -> targetlsn ))));
10831082 }
10841083 }
10851084
@@ -1120,8 +1119,7 @@ bt_target_page_check(BtreeCheckState *state)
11201119 errdetail_internal ("Index tid=(%u,%u) tuple size=%zu lp_len=%u page lsn=%X/%X." ,
11211120 state -> targetblock , offset ,
11221121 tupsize , ItemIdGetLength (itemid ),
1123- (uint32 ) (state -> targetlsn >> 32 ),
1124- (uint32 ) state -> targetlsn ),
1122+ LSN_FORMAT_ARGS (state -> targetlsn )),
11251123 errhint ("This could be a torn page problem." )));
11261124
11271125 /* Check the number of index tuple attributes */
@@ -1147,8 +1145,7 @@ bt_target_page_check(BtreeCheckState *state)
11471145 BTreeTupleGetNAtts (itup , state -> rel ),
11481146 P_ISLEAF (topaque ) ? "heap" : "index" ,
11491147 htid ,
1150- (uint32 ) (state -> targetlsn >> 32 ),
1151- (uint32 ) state -> targetlsn )));
1148+ LSN_FORMAT_ARGS (state -> targetlsn ))));
11521149 }
11531150
11541151 /*
@@ -1195,8 +1192,7 @@ bt_target_page_check(BtreeCheckState *state)
11951192 RelationGetRelationName (state -> rel )),
11961193 errdetail_internal ("Index tid=%s points to heap tid=%s page lsn=%X/%X." ,
11971194 itid , htid ,
1198- (uint32 ) (state -> targetlsn >> 32 ),
1199- (uint32 ) state -> targetlsn )));
1195+ LSN_FORMAT_ARGS (state -> targetlsn ))));
12001196 }
12011197
12021198 /*
@@ -1225,8 +1221,7 @@ bt_target_page_check(BtreeCheckState *state)
12251221 RelationGetRelationName (state -> rel )),
12261222 errdetail_internal ("Index tid=%s posting list offset=%d page lsn=%X/%X." ,
12271223 itid , i ,
1228- (uint32 ) (state -> targetlsn >> 32 ),
1229- (uint32 ) state -> targetlsn )));
1224+ LSN_FORMAT_ARGS (state -> targetlsn ))));
12301225 }
12311226
12321227 ItemPointerCopy (current , & last );
@@ -1282,8 +1277,7 @@ bt_target_page_check(BtreeCheckState *state)
12821277 itid ,
12831278 P_ISLEAF (topaque ) ? "heap" : "index" ,
12841279 htid ,
1285- (uint32 ) (state -> targetlsn >> 32 ),
1286- (uint32 ) state -> targetlsn )));
1280+ LSN_FORMAT_ARGS (state -> targetlsn ))));
12871281 }
12881282
12891283 /* Fingerprint leaf page tuples (those that point to the heap) */
@@ -1390,8 +1384,7 @@ bt_target_page_check(BtreeCheckState *state)
13901384 itid ,
13911385 P_ISLEAF (topaque ) ? "heap" : "index" ,
13921386 htid ,
1393- (uint32 ) (state -> targetlsn >> 32 ),
1394- (uint32 ) state -> targetlsn )));
1387+ LSN_FORMAT_ARGS (state -> targetlsn ))));
13951388 }
13961389 /* Reset, in case scantid was set to (itup) posting tuple's max TID */
13971390 skey -> scantid = scantid ;
@@ -1442,8 +1435,7 @@ bt_target_page_check(BtreeCheckState *state)
14421435 nitid ,
14431436 P_ISLEAF (topaque ) ? "heap" : "index" ,
14441437 nhtid ,
1445- (uint32 ) (state -> targetlsn >> 32 ),
1446- (uint32 ) state -> targetlsn )));
1438+ LSN_FORMAT_ARGS (state -> targetlsn ))));
14471439 }
14481440
14491441 /*
@@ -1500,8 +1492,7 @@ bt_target_page_check(BtreeCheckState *state)
15001492 RelationGetRelationName (state -> rel )),
15011493 errdetail_internal ("Last item on page tid=(%u,%u) page lsn=%X/%X." ,
15021494 state -> targetblock , offset ,
1503- (uint32 ) (state -> targetlsn >> 32 ),
1504- (uint32 ) state -> targetlsn )));
1495+ LSN_FORMAT_ARGS (state -> targetlsn ))));
15051496 }
15061497 }
15071498
@@ -1907,8 +1898,7 @@ bt_child_highkey_check(BtreeCheckState *state,
19071898 RelationGetRelationName (state -> rel )),
19081899 errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X." ,
19091900 state -> targetblock , blkno ,
1910- (uint32 ) (state -> targetlsn >> 32 ),
1911- (uint32 ) state -> targetlsn )));
1901+ LSN_FORMAT_ARGS (state -> targetlsn ))));
19121902
19131903 /* Check level for non-ignorable page */
19141904 if (!P_IGNORE (opaque ) && opaque -> btpo .level != target_level - 1 )
@@ -1993,8 +1983,7 @@ bt_child_highkey_check(BtreeCheckState *state,
19931983 RelationGetRelationName (state -> rel )),
19941984 errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X." ,
19951985 state -> targetblock , blkno ,
1996- (uint32 ) (state -> targetlsn >> 32 ),
1997- (uint32 ) state -> targetlsn )));
1986+ LSN_FORMAT_ARGS (state -> targetlsn ))));
19981987 pivotkey_offset = P_HIKEY ;
19991988 }
20001989 itemid = PageGetItemIdCareful (state , state -> targetblock ,
@@ -2024,8 +2013,7 @@ bt_child_highkey_check(BtreeCheckState *state,
20242013 RelationGetRelationName (state -> rel )),
20252014 errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X." ,
20262015 state -> targetblock , blkno ,
2027- (uint32 ) (state -> targetlsn >> 32 ),
2028- (uint32 ) state -> targetlsn )));
2016+ LSN_FORMAT_ARGS (state -> targetlsn ))));
20292017 itup = state -> lowkey ;
20302018 }
20312019
@@ -2037,8 +2025,7 @@ bt_child_highkey_check(BtreeCheckState *state,
20372025 RelationGetRelationName (state -> rel )),
20382026 errdetail_internal ("Target block=%u child block=%u target page lsn=%X/%X." ,
20392027 state -> targetblock , blkno ,
2040- (uint32 ) (state -> targetlsn >> 32 ),
2041- (uint32 ) state -> targetlsn )));
2028+ LSN_FORMAT_ARGS (state -> targetlsn ))));
20422029 }
20432030 }
20442031
@@ -2178,8 +2165,7 @@ bt_child_check(BtreeCheckState *state, BTScanInsert targetkey,
21782165 RelationGetRelationName (state -> rel )),
21792166 errdetail_internal ("Parent block=%u child block=%u parent page lsn=%X/%X." ,
21802167 state -> targetblock , childblock ,
2181- (uint32 ) (state -> targetlsn >> 32 ),
2182- (uint32 ) state -> targetlsn )));
2168+ LSN_FORMAT_ARGS (state -> targetlsn ))));
21832169
21842170 for (offset = P_FIRSTDATAKEY (copaque );
21852171 offset <= maxoffset ;
@@ -2220,8 +2206,7 @@ bt_child_check(BtreeCheckState *state, BTScanInsert targetkey,
22202206 RelationGetRelationName (state -> rel )),
22212207 errdetail_internal ("Parent block=%u child index tid=(%u,%u) parent page lsn=%X/%X." ,
22222208 state -> targetblock , childblock , offset ,
2223- (uint32 ) (state -> targetlsn >> 32 ),
2224- (uint32 ) state -> targetlsn )));
2209+ LSN_FORMAT_ARGS (state -> targetlsn ))));
22252210 }
22262211
22272212 pfree (child );
@@ -2292,8 +2277,7 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
22922277 errdetail_internal ("Block=%u level=%u left sibling=%u page lsn=%X/%X." ,
22932278 blkno , opaque -> btpo .level ,
22942279 opaque -> btpo_prev ,
2295- (uint32 ) (pagelsn >> 32 ),
2296- (uint32 ) pagelsn )));
2280+ LSN_FORMAT_ARGS (pagelsn ))));
22972281 return ;
22982282 }
22992283
@@ -2314,8 +2298,7 @@ bt_downlink_missing_check(BtreeCheckState *state, bool rightsplit,
23142298 RelationGetRelationName (state -> rel )),
23152299 errdetail_internal ("Block=%u page lsn=%X/%X." ,
23162300 blkno ,
2317- (uint32 ) (pagelsn >> 32 ),
2318- (uint32 ) pagelsn )));
2301+ LSN_FORMAT_ARGS (pagelsn ))));
23192302
23202303 /* Descend from the given page, which is an internal page */
23212304 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,
23812364 RelationGetRelationName (state -> rel )),
23822365 errdetail_internal ("Top parent/target block=%u leaf block=%u top parent/under check lsn=%X/%X." ,
23832366 blkno , childblk ,
2384- (uint32 ) (pagelsn >> 32 ),
2385- (uint32 ) pagelsn )));
2367+ LSN_FORMAT_ARGS (pagelsn ))));
23862368
23872369 /*
23882370 * 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,
24082390 RelationGetRelationName (state -> rel )),
24092391 errdetail_internal ("Block=%u level=%u page lsn=%X/%X." ,
24102392 blkno , opaque -> btpo .level ,
2411- (uint32 ) (pagelsn >> 32 ),
2412- (uint32 ) pagelsn )));
2393+ LSN_FORMAT_ARGS (pagelsn ))));
24132394}
24142395
24152396/*
0 commit comments