model-writtenrun 6392 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Mark Dilger opened the thread with a reproducible logical-replication crash when a table had an ordinary index but no replica identity index, attaching defensive checks and a regression test in #1.
- Takamichi Osumi reproduced the null-index-descriptor crash, confirmed the test passed with the fix, and recommended RelationIsValid() while questioning the additional defensive checks in #4.
- Mark Dilger explained his concern about concurrent index removal and OID reuse in #6, while Amit Kapila argued that historic snapshots protect this access in #7; Dilger retained the checks, expanded their explanation, and adopted RelationIsValid() in #8.
- Amit Kapila explained that callers setting up historic snapshots must invalidate caches appropriately and that an unexpectedly invalid relation should raise an error rather than silently return in #9.
- Amit Kapila committed Mark Dilger’s revised patch from #8 as 2731ce1bd5, changing invalid-relation handling to ERROR, omitting the speculative rd_index check, and moving the regression case into the existing replication test file, as reported in #10.
- Japin Li then questioned the unfreed index list on the new early-return path in #11; Amit Kapila explained that the output context is reset after each change and suggested RelationGetReplicaIndex() to simplify the code in #14.
- Japin Li supplied the cleanup inline in #15, and Amit Kapila endorsed its direction but deferred it until after Beta2 and requested an attachment in #16; Li supplied that attachment in #17, which Takamichi Osumi reviewed and tested successfully in #18.
- Amit Kapila committed Japin Li’s attachment unchanged as ee3fdb8f34 and announced completion in #19, leaving both the crash fix and the follow-up cleanup landed with no outstanding patch in the thread.