model-writtenrun 4450 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro opened the thread with a working-but-unsafe parallel full/right hash join prototype, explaining how waiting after emitting tuples could deadlock tuple queues and how executor scheduling could introduce further hazards #1.
- After a year, Melanie Plageman implemented the proposed compromise: all but the last probing worker detach, leaving one worker to emit unmatched inner tuples; she supplied bucket and chunk variants and proposed opportunistic help across batches as possible future work #2.
- Thomas tested simple cases and supported the single-worker compromise and chunk scanning, while Melanie explained that the tested TPC-DS joins lacked the partial input paths required for parallel hash joining #3 #4.
- Melanie extended chunk scanning to serial joins, discovered that freeing chunks during scanning broke hash-table reuse on rescans, and removed premature freeing while refining the barrier primitive and comments #4 #5.
- Thomas extracted Melanie's barrier primitive with cosmetic edits into 7888b09994, then resent the remaining feature without its unnecessary probe wait event #7.
- Melanie supplied a follow-up delta placing the unmatched scan before the final DONE phase, and Thomas folded it into the complete feature before separating prerequisite cleanup, phase naming and full/right join support into three patches #8 #9 #10.
- The phase-renaming component of #10 first landed with comment-only adjustments as 378802e371.
- Melanie subsequently endorsed the clearer FREE and REALLOCATE names, while Zhihong Yu reviewed placement of the chunk cursor and accepted keeping it outside each chunk with better explanation #11 #12 #13 #14.
- After a rebase, Justin Pryzby reproduced intermittent shutdown crashes in the cleanup prerequisite and connected them to an earlier landing and reversion; Melanie revised the empty-inner early-return path and promptly removed an erroneous extra detach #17 #20 #21 #22.
- Further failures exposed an assertion that wrongly assumed only one worker could remain attached during unmatched scanning; Melanie explained that late workers briefly attach and detach safely, removed the assertion, and Thomas accepted the diagnosis and reformatted the series #23 #24 #25 #26.
- Following another long delay, the phase-renaming component of #26 landed as 8fba928fd7, with documentation, ordering and comment updates.
- Thomas revived the remaining feature as separate memory-order scanning and parallel full join patches, consolidated their scan state, and fixed a cleanup race when a worker attached during the unmatched-scan phase #29.
- After Melanie's review, Thomas identified a potential incorrect-result case when LIMIT caused one worker to abandon probing while another emitted unmatched rows, and added shared suppression of the unmatched scan #30 #31.
- Melanie accepted that defensive fix, supplied a multi-batch regression test, and raised the question of costing the serial portion; Thomas retained the existing costing model because the expected aggregate work remained unchanged and a better imbalance model was unclear #32 #33.
- Thomas committed the feature and shutdown safeguard from #31 together with the test from #32 as 11c2d6fdf5, dropping memory-order scanning and restoring bucket traversal to leave room for further optimization research #33.
- Thomas then posted a separate draft allowing workers to help unmatched scans already running in other batches, while leaving single-batch scan parallelism and ideas involving specialization, tagged pointers, prefetching and earlier batch loading for future work #33.
- Tom Lane found that a planner comment still claimed full/right joins were excluded, and Thomas removed the obsolete sentence in f303ec6210 #34 #35.
- Tom later reported a buildfarm failure in another single-participant assertion; Melanie diagnosed the same harmless late-attachment race and recommended deleting that assertion, which Thomas did in b37d051b0e #36 #39 #41.
- At the final reply, the main feature and reported follow-up fixes had landed, while the opportunistic multi-batch enhancement remained a draft and broader unmatched-scan optimization remained future work #33 #41.