@@ -340,7 +340,7 @@ bt_check_every_level(Relation rel, Relation heaprel, bool readonly,
340
340
/*
341
341
* Initialize state for entire verification operation
342
342
*/
343
- state = palloc (sizeof (BtreeCheckState ));
343
+ state = palloc0 (sizeof (BtreeCheckState ));
344
344
state -> rel = rel ;
345
345
state -> heaprel = heaprel ;
346
346
state -> readonly = readonly ;
@@ -772,13 +772,15 @@ bt_check_level_from_leftmost(BtreeCheckState *state, BtreeLevel level)
772
772
* - That tuples report that they have the expected number of attributes.
773
773
* INCLUDE index pivot tuples should not contain non-key attributes.
774
774
*
775
- * Furthermore, when state passed shows ShareLock held, and target page is
776
- * internal page, function also checks:
775
+ * Furthermore, when state passed shows ShareLock held, function also checks:
777
776
*
778
777
* - That all child pages respect downlinks lower bound.
779
778
*
779
+ * - That downlink to block was encountered in parent where that's expected.
780
+ * (Limited to heapallindexed readonly callers.)
781
+ *
780
782
* This is also where heapallindexed callers use their Bloom filter to
781
- * fingerprint IndexTuples.
783
+ * fingerprint IndexTuples for later IndexBuildHeapScan() verification .
782
784
*
783
785
* Note: Memory allocated in this routine is expected to be released by caller
784
786
* resetting state->targetcontext.
@@ -1074,7 +1076,7 @@ bt_target_page_check(BtreeCheckState *state)
1074
1076
/*
1075
1077
* * Check if page has a downlink in parent *
1076
1078
*
1077
- * This can only be checked in readonly + heapallindexed case.
1079
+ * This can only be checked in heapallindexed + readonly case.
1078
1080
*/
1079
1081
if (state -> heapallindexed && state -> readonly )
1080
1082
bt_downlink_missing_check (state );
@@ -1561,7 +1563,7 @@ bt_downlink_missing_check(BtreeCheckState *state)
1561
1563
* infinity items. Besides, bt_downlink_check() is unwilling to descend
1562
1564
* multiple levels. (The similar bt_downlink_check() P_ISDELETED() check
1563
1565
* within bt_check_level_from_leftmost() won't reach the page either, since
1564
- * the leaf's live siblings should have their sibling links updating to
1566
+ * the leaf's live siblings should have their sibling links updated to
1565
1567
* bypass the deletion target page when it is marked fully dead.)
1566
1568
*
1567
1569
* If this error is raised, it might be due to a previous multi-level page
0 commit comments