model-writtenrun 9202 - 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 intermittent deadlock-hard isolation-test failures involving completion order and error output #1; Tom Lane then reported a deadlock-parallel timeout and suspected a parallel deadlock-detection bug on machines with unusual timing #2.
- Thomas Munro documented further deadlock-parallel failures, including persistent failures on a CLOBBER_CACHE_ALWAYS animal #3, while Tom Lane could not reproduce them and deferred choosing between a server fix and a test fix #4.
- Thomas Munro reproduced a hang by shortening deadlock timeouts, suspected a race between worker startup and lock-queue entry, and questioned why only one worker appeared for the second parallel query #5.
- Tom Lane reproduced the race with randomized worker-startup delays and explained that isolationtester's required completion order created a client-side dependency invisible to the deadlock detector; his patch added an advisory lock to expose that dependency and passed several thousand iterations #6.
- Tom Lane's patch also reduced max_parallel_workers_per_gather to three to leave capacity for multiple workers in the second query; he left the longer deadlock timeouts intact and noted that the unavailable final worker slot remained unexplained #6.
- The attached patch #6 landed unchanged as 9be4ce4fa3, resolving the diagnosed deadlock-parallel test race; the supplied thread contains no resolution of the original deadlock-hard failures reported in #1 and no independent review of the attached fix.