forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2d4f99b
committed
Fix briefly showing old progress stats for ANALYZE on inherited tables.
ANALYZE on a table with inheritance children analyzes all the childtables in a loop. When stepping to next child table, it updated thechild rel ID value in the command progress stats, but did not resetthe 'sample_blks_total' and 'sample_blks_scanned' counters.acquire_sample_rows() updates 'sample_blks_total' as soon as the scanstarts and 'sample_blks_scanned' after processing the first block, butuntil then, pg_stat_progress_analyze would display a bogus combinationof the new child table relid with old counter values from thepreviously processed child table. Fix by resetting 'sample_blks_total'and 'sample_blks_scanned' to zero at the same time that'current_child_table_relid' is updated.Backpatch to v13, where pg_stat_progress_analyze view was introduced.Reported-by: Justin PryzbyDiscussion:https://www.postgresql.org/message-id/20230122162345.GP13860%40telsasoft.com1 parentfd6a06f commit2d4f99b
1 file changed
+19
-2
lines changedLines changed: 19 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1552 | 1552 |
| |
1553 | 1553 |
| |
1554 | 1554 |
| |
1555 |
| - | |
1556 |
| - | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
1557 | 1574 |
| |
1558 | 1575 |
| |
1559 | 1576 |
| |
|
0 commit comments
Comments
(0)