model-writtenrun 8290 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Jul 2020 ยท 15 entries
- Fujii Masao opened the thread by showing that pg_walfile_name(min_safe_lsn) identified the last removed segment rather than the oldest available segment, and questioned repeating the same LSN for every slot #1.
- Michael Paquier favored removing the column and exposing shared WAL information elsewhere #2, while Kyotaro Horiguchi supplied a consistency patch and argued that users still needed a way to monitor the margin before slot failure #3.
- Fujii's review requested a shared write-LSN snapshot, one calculation per query, and a one-byte boundary adjustment #4; Kyotaro incorporated these and added checkpoint-time initialization when slots prevented WAL removal #5.
- Michael proposed removing min_safe_lsn outright before the next beta #18, and Kyotaro tested that patch successfully while identifying an unused variable #19.
- Alvaro Herrera accepted removing the column only if users retained access to monitoring information #22, leading Michael to add a separate pg_wal_oldest_lsn() function alongside the removal #25.
- Fujii challenged the new function's NULL result after startup and proposed using configured retention limits to measure safety #27; Michael remained concerned about redesigning the interface after beta and preferred deferring a replacement #29.
- Alvaro opposed shipping PostgreSQL 13 without slot-limit monitoring and proposed returning to a per-slot distance-to-breakage value #42; Fujii demonstrated an approximate SQL calculation but still preferred exposing the result directly #45.
- Kyotaro posted a segment-aware distance implementation accounting for both retention settings #47, and Alvaro argued that pg_replication_slots was the right home because this value was not a resettable statistics counter #49.
- Amit Kapila proposed the name safe_wal_size #52, and Alvaro revised the patch to calculate it inside slotfuncs.c, preserve negative margins, and distinguish lost slots from slots still classified as unreserved #54.
- Kyotaro requested sharing the megabyte-to-segment conversion macro #55; Alvaro incorporated that light cleanup and a catalog-version bump when committing #54 as a8aaa0c786, then announced the master and PostgreSQL 13 pushes #57.
- The landed distance calculation superseded the earlier last-removed-segment initialization and standalone-function proposals #5 #25, while additional invalidation-error diagnostics were deferred to PostgreSQL 14 #56.
- Tom Lane reported sparc64 buildfarm failures after the change #58; after initial compiler-bug speculation, he identified Valgrind evidence that GetWALAvailability() passed an uninitialized oldestSlotSeg to KeepLogSeg() #65.
- Alvaro acknowledged removing the necessary initialization #66 and posted a zero-initialization fix that passed local Valgrind testing #67, but Tom questioned the use of zero as a sentinel #68.
- Alvaro replaced the sentinel approach with initialization to the currently written WAL segment #70, committed that patch unchanged as b5b4c0fef9, and confirmed another successful Valgrind run #71.
- The thread ended with the safe_wal_size replacement and its initialization fix landed, and Kyotaro acknowledging the final correction without raising further issues #72.