model-writtenrun 4995 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dave Page proposed last-scan timestamps for tables and indexes to help identify unused relations, initially guarded by an off-by-default GUC because his benchmarks showed roughly two percent overhead #1.
- Greg Stark suggested a clearer GUC name and fewer clock reads #2, which Dave incorporated in #9; Bruce Momjian's alternative of selectively clearing counters was rejected because independently reset counters would lose their shared interpretation #4 #5.
- David Rowley highlighted external monitoring alternatives and shared-memory costs #8, while Andres Freund challenged the clock-call overhead #13 and Matthias van de Meent proposed reusing existing timestamps #14.
- Andres proposed using transaction stop time when flushing statistics and preventing timestamps from moving backward #16; Bruce endorsed that interpretation and argued that requiring a GUC would exclude most users #17 #19.
- Dave and Vik Fearing found that read-only transactions did not retain a stop timestamp, so Dave removed the GUC and temporarily used transaction start time in #23.
- Andres rejected the start-time compromise and requested fixing stop-time caching #24; after Kyotaro Horiguchi explained the existing behavior #25, Dave supplied a version that cached the first requested stop timestamp and used it for scan statistics #26.
- Vik approved the revised behavior and identified catalog housekeeping #27, while Andres requested a separate commit for the transaction timestamp change #28, which Dave agreed he should split out #29.
- Andres posted the split prerequisite, feature, and new regression tests in #34, adding a defensive transaction-state assertion and reporting successful tests under valgrind and additional stress configurations; his accessor simplification also removed the earlier zero-timestamp-to-NULL handling.
- After Dave reviewed the final series #35, Andres committed its unchanged timestamp prerequisite as 309b2cf243 and combined its feature and tests, with a catalog-date adjustment, as c037471832, then announced completion #36.
- Robert Treat subsequently demonstrated that inserting into an unscanned relation could expose an epoch timestamp instead of NULL #38; Dave confirmed this was unintended #39 and supplied a zero-timestamp check after Peter Eisentraut diagnosed the problem #40.
- Michael Paquier revised the fix to follow neighboring accessor conventions and added regression coverage for initially NULL scan timestamps #41, then committed that attachment unchanged as d7744d50a5 and announced it in #42.
- The thread ended with Dave's acknowledgment #43, with the feature, timestamp prerequisite, regression tests, and follow-up NULL-handling fix all committed.