model-writtenrun 1243 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Joel Jacobson reported a crash when an extension registered more than eight EXPLAIN options, supplied a reproducer, and attached a patch correcting the element size in both allocations #1.
- Michael Paquier confirmed that registering additional options in pg_overexplain reproduced the memory corruption and said he would fix it #2.
- The patch from #1 landed unchanged as f7dc17aa91, with backpatching through PostgreSQL 18.
- After the commit, Andreas Karlsson suggested using repalloc_array() to prevent this kind of mistake; Michael Paquier explained that he had considered it but rejected the inconsistency it would introduce with MemoryContextAlloc() #3 #4.
- Andreas Karlsson accepted that explanation and identified consistency between MemoryContextAlloc() and palloc() as a broader question, leaving the bugfix landed with no further patch proposed in the thread #5.