model-writtenrun 4224 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Dec 2021 - Aug 2022 · 15 entries
- Sami Imseih opened the thread with a proposal to expose the current index, scanned and total index blocks, and parallel-leader identity so users could see whether index vacuuming was progressing #1.
- Nathan Bossart argued that users also needed completed and pending index information and favored a separate index-progress view; Sami adopted that direction #2 #3 #5.
- Greg Stark suggested total/processed index counters, Peter Geoghegan explained why index AMs could not reliably share heap-style block progress, and Masahiko Sawada recommended aggregate index counts in the leader's existing progress row #4 #7 #9.
- Justin Pryzby forwarded a rebased, machine-readable version of Sami's patch, establishing the first indexed submission #11.
- Sami replaced block counts with index ordinals, tuples removed and maximum cycle time, then incorporated Justin's regression and formatting corrections #13 #14 #15.
- Nathan questioned the usefulness of cycle-time estimates and confusing counter names, leading Sami to remove timing and add documentation while retaining per-index detail reporting #16 #19.
- Discussion of the separate view and ordinal semantics led to aggregate total/completed counts alongside per-index detail, initially combining worker statistics in SQL #23 #26.
- Sami replaced SQL aggregation with persistent shared-memory counters after further discussion with Nathan, because workers could exit before the overall operation completed #29 #40.
- The work was split into aggregate counters, a per-index detail view and an index_vacuum_count rename, then resent with corrected application order #31 #32.
- Nathan's review prompted a switch from a spinlocked array to an LWLock-protected hash table and clearer resetting of counters when index processing ended or failsafe intervened #33 #36 #38.
- Further revisions corrected counting, shared-memory sizing and view complexity, and Nathan judged the series close to ready #43 #49 #51 #52.
- Sawada objected to vacuum-specific shared-memory allocation and poor extensibility, so Sami extracted reusable parallel-progress infrastructure into a four-patch series #53 #54 #56.
- Sawada raised hash-capacity concerns, Andres Freund rejected central locking and repeated hash lookups, and Robert Haas argued for DSM-based communication with the leader #58 #59 #66 #68 #72.
- Sami responded with leader polling through a ParallelContext callback and narrowed the work to aggregate counters, leaving the per-index view and cycle-count rename outside the active series #75.
- The next revision moved reporting after index completion, but discussion exposed the need to update progress while the leader was still processing a large index, not merely while waiting for workers #78 #79 #80 #82.
Oct 2022 - Apr 2023 · 12 entries
- After several months, Sami returned with a DSM atomic counter, reporting through vacuum_delay_point, a separate waiting loop and a revived per-index view #85.
- Sawada challenged the global pointer, busy waiting and use of general vacuum-delay machinery; Sami moved reporting into index-AM callbacks and separated individual-index identification into a SQL-function patch #86 #88 #90.
- Andres objected to per-page indirect calls and callbacks under buffer locks, leading Sami to remove callbacks, report roughly every gigabyte and omit BRIN instrumentation #92 #93.
- Sawada found that the copied atomic counter was backend-local and requested interruptible timed waiting; Sami fixed the counter access, handled INDEX_CLEANUP OFF and introduced a dedicated wait event #94 #95.
- Sawada then explained how a global progress pointer could become stale after an error, prompting Sami to pass ParallelVacuumState through IndexVacuumInfo instead #98 #99.
- A rebase was followed by assertion-build fixes and Bertrand Drouvot's documentation and comment corrections #101 #102 #103 #104 #105.
- Sawada and Sami settled on exposing nonzero counters only during index vacuuming and cleanup, with related progress fields updated together #106 #108 #109.
- Andres identified asynchronous worker-to-leader updates as the missing mechanism, and Sami replaced AM polling and the extra waiting loop with a new 'P' message handled through the existing parallel-message machinery #110 #111.
- Sawada reviewed the notification implementation and supplied a fix-up patch covering naming, documentation, assertions and counter updates; Sami folded it into the full patch and completed the naming cleanup #115 #116 #117 #119.
- Michael Paquier questioned the callback interface, while Sami confirmed that individual-index reporting would be pursued separately after aggregate progress landed #121 #123.
- Michael proposed carrying the progress parameter and increment directly in the message, eliminating callbacks and extra shared counters; Sami implemented the generic pgstat_progress_parallel_incr_param API #124 #126 #128.
- Michael caught the receiver's incorrect increment width and missing message-end check, Sami corrected them, and Michael checked the reporting paths and supplied formatting adjustments after the PostgreSQL 16 cutoff #129 #131 #133.
Jul 2023 · 4 entries
- Sawada resumed the work in July with a refreshed base and commit message, then split the generic messaging API from the vacuum feature following Michael's suggestion #135 #136 #137.
- The infrastructure half of the final series landed unchanged as f1889729dd, adding incremental worker-to-leader progress messages from #137.
- The vacuum half landed as 46ebdfe164, preserving the implementation from #137 and adding a catalog-version bump for indexes_total and indexes_processed.
- Sawada's final message confirmed both patches were pushed; aggregate progress and its messaging infrastructure were complete, while individual-index detail remained deferred to separate work #138 #123.