model-writtenrun 8803 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Julien Rouhaud proposed exposing the lock-group leader PID in pg_stat_activity so SQL could associate parallel workers with their backend, motivated by Guillaume Lelarge's wait-event sampling use case #1.
- Julien added the missing regression expectations in #2; Guillaume successfully tested parallel SELECT and CREATE INDEX behavior in #3, and Julien corrected the documented column name in #4.
- Sergei Kornilov verified compilation and tests but asked for documentation explaining parallel leaders, workers and NULL values, prompting discussion of user-facing terminology instead of unexplained lock-group internals #8 #10 #11.
- Michael Paquier recommended the term parallel group leader and shared handling of backend and auxiliary-process data, then identified a race in repeatedly dereferencing lockGroupLeader and questioned cross-row consistency #12 #13.
- After discussing stronger locking and an alternative array of worker PIDs, Julien retained the scalar leader_pid column for SQL usability, cached the leader pointer locally and consolidated process handling in #17, following the alternatives discussed in #15 and #16.
- Tomas Vondra supported the scalar column and accepted imperfect consistency, requesting an explanatory code comment; Michael likewise accepted avoiding extra locks but identified that a backend remains a leader after its parallel query finishes #18 #20 #21.
- Julien documented the persistent leader state and consistency limitation in #22, after which Michael supplied revised wording and the missing NULL assignment for users without sufficient privileges in #23.
- Julien accepted the final revision in #24, and Michael committed #23 unchanged as b025f32e0b, confirming completion in #25.
- Julien then questioned whether leader status should persist for the backend's lifetime and attached an independent ProcKill comment typo fix in #26; that fix landed unchanged as 5ac4e9a12c.
- At the thread's close, both patches had landed, while changing the lifetime of leader status remained an unanswered design question: Michael suggested shutdown-order assumptions as a possible explanation and referred to the original design discussion #27.