model-writtenrun 3327 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nathan Bossart reported that unlogged sequences make pg_sequence_last_value() and pg_sequences fail on standbys in #1; Tom Lane favored returning NULL inside the C function because that could repair released versions without changing their system-view definitions in #2.
- Nathan posted the initial guard and recovery test in #4; Michael Paquier accepted the approach and proposed also returning NULL on permission failures so the view's duplicate privilege check could be removed in #5.
- Discussion established that pg_sequences must continue excluding other sessions' temporary sequences: Nathan raised the visibility problem in #6, Michael acknowledged it in #8, and Tom ultimately confirmed that the WHERE filter must remain in #13.
- Nathan proposed protecting direct calls against other sessions' temporary sequences in #10; Tom corrected the Boolean condition and requested result initialization in #11, which Nathan incorporated in #12.
- Nathan split the work into a backpatchable bug fix and a v18 privilege-check cleanup in #14, and Michael endorsed both in #15.
- After announcing staged branch-specific versions in #16, Nathan committed the first part of #14 as 3cb2f13ac5, adding documentation and light code cleanup; the unlogged-sequence fix was backpatched through v15 and the temporary-sequence protection through v12, with completion announced in #17.
- Nathan reposted the remaining privilege-check cleanup, rebased onto the landed fix, in #18 and deferred it until v18 development opened.
- The remaining patch from #18 landed as 7967d10c5b with comment edits and a catalog-version bump; Nathan's final announcement in #19 closed the thread with both changes committed.