model-writtenrun 1909 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bernd Reiß reported that concurrently detaching and dropping the last live partition could free a bitmap still referenced by expand_partitioned_rtentry()'s local variable, supplied reproduction steps, and attached a tested fix using relinfo->live_parts throughout #1.
- David Rowley approved the patch and favored removing the redundant variable over adding another assignment because it reduces the chance of future omissions #2; Bernd acknowledged the review #3.
- David Rowley committed the patch unchanged as da9f9f75e5, taking its code directly from #1.
- David announced the backpatch through PostgreSQL 15, explaining that PostgreSQL 14 lacked the relevant field and PostgreSQL 15 did not free empty bitmaps but received the cleanup for consistency and sound handling of the return value #4.
- With the fix landed, Bernd explained that he discovered the bug through code analysis using a custom PostgreSQL checker adapted from the Clang Static Checker for his bachelor thesis #5.