| From: | shihao zhong <zhong950419(at)gmail(dot)com> |
|---|---|
| To: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
| Cc: | Sami Imseih <samimseih(dot)pg(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Sami Imseih <samimseih(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com> |
| Subject: | Re: Report index currently being vacuumed in pg_stat_progress_vacuum |
| Date: | 2026-09-17 02:23:40 |
| Message-ID: | CAGRkXqSYB-LBEZmfu9qmj75CC_3gthKqD3mYw1yYZWRSWoOopQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Bharath,
v7 looks good here. Tested sequential, parallel on btree and GIN, all as the
docs describe, including GIN reporting zero blocks and the reset
clearing the previous index. Applies cleanly on 5e595d659fd, suites
pass.
You were right that this needs an injection point, polling is not
reliable when the value is set and reset around every index. One thing
to add: the sequential path needs one too, not just the parallel
workers, since lazy_vacuum_one_index sets and resets just as tightly. A
single point in the per index loop covers both.
Attached as two patches, take either half. v7-0003 is the injection
point, v7-0004 a TAP test in test_misc. Runs in about a second, under
both meson and make. Sanity check, it does fail if you take out the
progress update.
It does not cover the reset to 0, only that the value moves on. That
needs a second point after the reset.
Thanks,
Shihao
| Attachment | Content-Type | Size |
|---|---|---|
| v7-0003-Add-an-injection-point-in-the-per-index-vacuum-lo.patch | application/octet-stream | 1.2 KB |
| v7-0004-Add-a-TAP-test-for-per-index-vacuum-progress-repo.patch | application/octet-stream | 3.7 KB |
| v7-0001-Report-per-index-vacuum-progress-in-pg_stat_progr.patch | application/octet-stream | 17.8 KB |
| v7-0002-Remove-IndexVacuumInfo.report_progress.patch | application/octet-stream | 4.7 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Guo | 2026-09-17 02:40:57 | Re: remove_useless_joins vs. bug #19560 |
| Previous Message | Robert Haas | 2026-09-17 02:15:35 | Re: pg_*_advice: tsv load failure, etc. |