model-writtenrun 9737 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Slavov reported PostgreSQL 10.3 crashing during logical replication in #1, and supplied a backtrace showing replica-identity attribute lookup reaching SQL-function evaluation without an active snapshot in #3.
- Andres Freund traced the problem to evaluating predicates of unrelated indexes while collecting replica-identity attributes in #5, and Alvaro Herrera agreed to retrieve only the identity index's columns in #6; the reporter confirmed that removing a partial index using months_ago() stopped the crash in #11.
- Alvaro's patch in #12 read replica-identity attributes directly in logicalrep_write_attrs(), accepting an additional syscache lookup after finding a separately cached fast path too messy.
- The reporter encountered a compilation failure against PostgreSQL 10 in #13, and Michael Paquier explained in #14 that the patch targeted master and used the newer indnkeyatts catalog field.
- After several months, Petr Jelinek supplied PostgreSQL 10 and 11+ variants in #16, retaining specialized replica-identity retrieval while using RelationGetReplicaIndex() and the existing rd_idattr cache.
- Michael requested a regression test in #17 and identified an analogous subscriber crash plus concerns about shared cache handling in #20; Petr argued in #21 that the subscriber should retain RelationGetIndexAttrBitmap() but establish its snapshot earlier.
- Following Andres's explanation that the subscriber must maintain all indexes in #23, Michael outlined separate publisher and subscriber fixes plus an optional snapshot assertion in #24; Kyotaro Horiguchi confirmed that moving snapshot setup fixed the subscriber crash and discussed broader assertion placement in #25.
- Peter Eisentraut replaced those separate fixes with a central solution in #26: read index metadata directly in RelationGetIndexAttrBitmap(), avoiding BuildIndexInfo() and constant-expression evaluation, and add a regression test covering both replication endpoints.
- Noah Misch found no functional problems and suggested a commit-message correction in #27, while Michael reviewed the new approach and suggested clearer comment wording in #28.
- Peter committed #26 with those light editorial changes as dfa774ff9a and confirmed backpatching in #29; the thread ended with Michael's acknowledgment in #30, with the earlier specialized fixes superseded and no further patch pending.