forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc181f2e
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 parent1d5caec commitc181f2e
1 file changed
+19
-2
lines changedLines changed: 19 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1531 | 1531 |
| |
1532 | 1532 |
| |
1533 | 1533 |
| |
1534 |
| - | |
1535 |
| - | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
1536 | 1553 |
| |
1537 | 1554 |
| |
1538 | 1555 |
| |
|
0 commit comments
Comments
(0)