mirror of
https://github.com/postgres/postgres.git
synced 2026-10-29 15:58:33 +03:00
Count the last block of the validation scan in a concurrent index build
heapam_index_validate_scan() reports PROGRESS_SCAN_BLOCKS_DONE as the number of the block that the scan starts on, forgetting to count the last block scanned. Due to the last block not being counted, the number of blocks_done never matched blocks_total. This information could remain on the view for a long time, depending on the waits done between the phases of CREATE INDEX CONCURRENTLY or REINDEX CONCURRENTLY. This is incorrect still purely cosmetic, so no backpatch is done. Author: Manu <manuelreyesbravo@gmail.com> Discussion: https://postgr.es/m/179303526069.2212386.7608335332316408826@gmail.com
This commit is contained in:
@@ -1931,6 +1931,10 @@ heapam_index_validate_scan(Relation heapRelation,
|
||||
}
|
||||
}
|
||||
|
||||
/* Report scan progress, one last time. */
|
||||
pgstat_progress_update_param(PROGRESS_SCAN_BLOCKS_DONE,
|
||||
hscan->rs_nblocks);
|
||||
|
||||
table_endscan(scan);
|
||||
|
||||
ExecDropSingleTupleTableSlot(slot);
|
||||
|
||||
Reference in New Issue
Block a user