model-writtenrun 7794 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Kyotaro Horiguchi opened the thread with #1, identifying five places where RelationNeedsWAL was being used to infer relation persistence despite its newer WAL-skipping semantics, and proposed a separate macro.
- Noah Misch's review in #3 identified a real CREATE PUBLICATION failure under wal_level=minimal, requested a regression test, preferred direct persistence checks, and questioned whether enabling early pruning without advancing page LSNs was safe.
- Kyotaro adopted direct persistence checks and added the publication test in #4, then removed a leftover macro and corrected argument parenthesization in #8; the unnecessary logical-decoding changes were dropped.
- Noah distinguished permission to prune from detection of previously pruned data in #6, then supplied a second scenario in #9 showing how the proposed patch could permit pruning without the LSN change needed to detect an old snapshot.
- Kyotaro first bypassed the LSN comparison under wal_level=minimal in #10, but existing-test behavior led him to submit an isolation test and a synthetic-LSN proof of concept in #11, updating LSNs during pruning and tablespace copying.
- Noah rejected spreading synthetic LSNs and supplied #12, which suppresses early pruning while WAL is skipped but uses persistence to recognize relations that may already contain pruned pages; the experimental isolation test was omitted because its required error no longer applied when pruning was suppressed, as explained in #14.
- Noah split the fixes into two patches and made cosmetic changes in #15; Kyotaro accepted the reasoning in #16 while raising a possible existing-test failure under wal_level=minimal.
- Noah reported all three existing old-snapshot tests passing in #17, and Kyotaro confirmed a successful rerun in the thread's last message, #18, resolving the remaining testing concern before the planned commit.
- Noah subsequently committed both final patches from #15: 360bd2321b fixed publication creation with only test-count rebase adjustments, and 7da83415e5 restored old-snapshot detection unchanged; both fixes were backpatched to PostgreSQL 13.