model-writtenrun 9700 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Rick Otten reported repeatable dsa_allocate failures in PostgreSQL 10.1 during a query with many parallel bitmap scans, and Tom Lane identified the error as an invariant violation rather than a resource-tuning issue #1 #2.
- Thomas Munro initially suspected an already-fixed parallel-query bug involving mixed-up DSA areas, and Rick confirmed that disabling parallel execution provided a workaround while awaiting PostgreSQL 10.2 #3 #4.
- Sand Stone subsequently reported the same error on PostgreSQL 10.4 with Citus; an apparent disappearance after environment changes proved temporary, and Thomas continued seeking plans and evidence rather than treating the problem as resolved #5 #8 #9 #11.
- Reports from Arne Roland, Fabio Isabettini, and Jakub Glapa established that failures persisted on PostgreSQL 10.6 and 11.1, with reproduction sensitive to query plans and data changes; Thomas and Justin Pryzby requested plans, logging, and core dumps to diagnose the elusive failure #13 #16 #19 #21 #22 #23 #24 #25.
- Thomas finally reproduced the allocation failure using concurrent parallel queries over partitioned tables, then narrowed it to incorrect tracking of the largest contiguous free span #27 #28.
- After Robert Haas examined the consolidation logic, Thomas corrected his diagnosis: the insertion returned a valid span size, but subsequent btree cleanup could shrink that span before the saved size overwrote the bookkeeping #29 #30 #31.
- Robert found that promotion from singleton representation to a btree ignored the soft flag and posted a two-line guard preventing that internal allocation during cleanup #33.
- Justin's overnight test still encountered stuck parallel workers, while Thomas's reproducer ran successfully for 90 minutes with Robert's fix; Thomas reposted the patch with an explanatory commit message and removal of a related obsolete comment #34 #37.
- Thomas and Tom Lane deferred committing until after the imminent release cutoff because the allocator's edge cases lacked strong regression coverage; Thomas proposed C unit-test infrastructure, while Tom favored a test module under src/test/modules/, and neither testing proposal was included in this patch #37 #38 #41 #42.
- Justin clarified that his remaining failures involved attaching to DSA segments and the worker hang tracked as bug #15585, and Thomas redirected that investigation to the separate bug thread #39 #40.
- Thomas committed the final patch unchanged as 7215efdc00, with backpatches to PostgreSQL 10 and 11, and announced the push in the thread's final message; the allocation fix was complete, while the separate attachment and worker-hang problems remained under investigation #37 #43.