model-writtenrun 7420 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Mar - Jun 2021 ยท 14 entries
- Masahiko Sawada opened the thread in #1 after finding that REFRESH MATERIALIZED VIEW took 42 seconds with frozen insertion versus 33 seconds without it, tracing the regression to repeated visibility-map pinning introduced by the COPY FREEZE improvements.
- After the regression became a PostgreSQL 14 open item in #3, Masahiko posted #4 to pin the visibility map only when needed for the first frozen insertion into an empty page; his benchmark returned to 33 seconds.
- Kyotaro Horiguchi's review in #5 led to an empty-page assertion, and Bharath Rupireddy's review in #9 prompted wording fixes, producing #8 and #10 with clearer assumptions and additional assertions.
- Bharath questioned the single-inserter assumption in #11, and Masahiko explained in #12 that concurrent frozen insertion was not currently supported and that assertions would expose a future violation.
- Tomas Vondra reported in #14 that the latest patch barely improved his benchmark, prompting Andres Freund to propose retaining visibility-map pins in BulkInsertState in #15.
- After discussion clarified that the relevant refresh path already supplied BulkInsertState, Andres posted the replacement implementation in #26; Tomas's testing in #27 reduced the regression from roughly 25 percent to approximately 5 percent.
- Michael Paquier raised release-stability concerns and suggested reverting in #28, while Alvaro Herrera argued in #37 that feature freeze still allowed performance fixes and supported investigating the pin-caching approach before reverting.
- Masahiko's benchmarks in #42 confirmed remaining overhead and emphasized that users could not disable freezing during refresh; Andres's analysis in #43 identified additional visibility WAL records as a possible cause.
- Following Andres's WAL proposal in #47, Tomas posted the experimental delta #51 on top of the pin-caching patch, eliminating the extra visibility records without a clear performance improvement.
- Masahiko's unlogged-table tests in #52 also retained the slowdown and showed better results with his original approach, but Andres considered that approach too fragile in #54, leaving the residual regression unresolved.
- Tomas posted the selective revert #56, preserving the multi-insert optimization while removing most single-row changes; after correcting the free-space argument during testing, he committed it as 8e03eb92e9 and announced completion in #57.
- The pin-caching and WAL experiments remained uncommitted, and Tomas noted in #57 that the result left TOAST-table benefits unresolved and suggested a future option to disable freezing; Masahiko supported further investigation for PostgreSQL 15 in #58.
- The thread ended with Tom Lane asking to remove the resolved PostgreSQL 14 open item in #59 and Andrew Dunstan agreeing in #60.
- A subsequent CLOBBER_CACHE_ALWAYS regression was handled in thread #44338, whose newer patch #479925 supplied d1f0aa7696 to restore the last-page fallback that the selective revert had removed.