model-writtenrun 9040 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Wyatt Alt reported partition creation failing after a column drop and creation of a partial index, then supplied a smaller reproducer; Michael Paquier preserved the reproducer directly in the thread #1 #2 #3.
- Michael diagnosed a correctly constructed attribute map being passed with the child's attribute count instead of the parent's, and posted a one-line fix with regression tests covering predicate and expression indexes #4.
- Michael proposed eventually returning the map length from the mapping API to prevent similar mistakes, but kept that broader change out of the backpatchable fix; Ibrar Ahmed supplied a PostgreSQL 11 adaptation #4 #5.
- Amit Langote reviewed the fix as correct, reported that it applied to PostgreSQL 12 and 11, and supported the proposed mapping-API improvement based on encountering the same logical pitfall #6.
- Michael committed #4 unchanged as dc816e5815 and confirmed backpatching through PostgreSQL 11, noting conflicts on that branch; the bugfix was complete while the broader API improvement remained follow-up work #7.