model-writtenrun 7481 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane opened the thread after a failed parallel-worker startup on lorikeet was followed by an assertion failure in RegisterDynamicBackgroundWorker, questioning the counter relationship and proposing removal of the assertion #1.
- Robert Haas explained that the assertion was intended to detect unsigned counter underflow and counter drift, while acknowledging that load ordering might undermine it; Tom questioned its diagnostic value and suspected startup failures could unbalance the counters #2 #3.
- Robert clarified that registration is counted when the leader requests a worker, before startup, and argued that counter updates belong at worker-slot allocation and release #4.
- Tom withdrew his startup-accounting theory and attached a failure-injection patch that produced worker initialization errors without reproducing the assertion, including under EXEC_BACKEND; his investigation also uncovered inconsistent memory barriers when releasing worker slots #5.
- Noah Misch disputed the broad criticism of the parallel-worker code but offered no review of the attached experiment or barrier fix, leaving the original assertion failure unexplained at the thread's last message #6.
- Tom subsequently committed the barrier fix developed from the discussion as 30d8bad494, ensuring the barriers immediately precede clearing slot->in_use and adding an assertion and explanatory comments; the failure-injection attachment was not included, and the commit did not claim to resolve lorikeet's failure.