model-writtenrun 4793 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Sergey Belyashov reported that restoring a dump of a partitioned table failed because pg_dump set replica identity before the partitioned index became valid #1.
- Tom Lane requested a concrete reproducer #2, and Sergey supplied SQL and dump/restore commands demonstrating the failure, also confirming it on PostgreSQL 15.1 #3.
- Tom traced the failure to setting replica identity before attaching the child index and favored relaxing the backend restriction because changing pg_dump's ordering would require substantial complication #4.
- Tom's patch allowed marking an invalid index, explaining that relcache would ignore it until valid, and removed an early exit in relation_mark_replica_identity to guarantee that only one index remained marked; he also raised backpatching related cleanup #5.
- After the thread's final message, Tom committed the patch with added regression coverage as c9f7f92648; the commit called for backpatching all supported branches, including the related cleanup, and the supplied metadata records five backports.