model-writtenrun 1662 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Lori Corbani reported inconsistent results for an EXISTS query after upgrading from PostgreSQL 17 to 18 #1, then supplied execution plans and test data showing a Parallel Hash Right Semi Join in the affected version #3 #4.
- Tom Lane reproduced duplicate output, traced the regression to right-semi join support, and identified concurrent workers checking and setting the same shared match flag without synchronization #6 #7.
- Richard Guo considered reverting right-semi joins, adding atomic match tracking, or disabling their parallel plans; he and Tom chose planner disablement as the backpatchable stopgap because atomic support required further portability and performance work #8 #10.
- Richard posted the planner restriction and a regression test #11; Tom confirmed the fix worked and requested a cheaper test using an existing table with transaction-local settings #12, which Richard incorporated while acknowledging the limited cost separation between competing plans #13 #14.
- Tom approved the revised patch #15, and Richard committed it unchanged as 257ee78341, confirming that it was also backpatched to PostgreSQL 18 #16.
- Thomas Munro proposed preserving parallel execution through atomic fetch-or on the match flag, discarding a tuple when another worker had already claimed it #17; Tom raised 16-bit atomic portability and alignment concerns and ruled out enlarging the tuple structure #18.
- Thomas reported a compiler experiment supporting smaller atomic operations and explored tagged pointers as another possible match-flag representation #22; meanwhile, Lori decided to remain on PostgreSQL 17 until the announced November 13 maintenance release #24.
- Thomas ended the thread with an experimental two-patch replacement that would revert 257ee78341 and introduce atomic match tracking on top of separate stdatomic.h patches #25; the stopgap had landed, while this replacement remained uncommitted with correctness testing, casting portability, and execution-specialization questions unresolved.