forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commited9247c
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 parent6875bac commited9247c
1 file changed
+19
-2
lines changedLines changed: 19 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1384 | 1384 |
| |
1385 | 1385 |
| |
1386 | 1386 |
| |
1387 |
| - | |
1388 |
| - | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
1389 | 1406 |
| |
1390 | 1407 |
| |
1391 | 1408 |
| |
|
0 commit comments
Comments
(0)