model-writtenrun 1338 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Heikki Linnakangas reported that the individual backend wait-event functions omitted auxiliary processes and proposed direct ProcNumber lookup with PID validation; he also raised missing backend-information functions and a possible unified PID lookup helper #1.
- Chao Li tested and endorsed the fix while questioning backend-only error wording, Kyotaro Horiguchi discussed the terminology, and Sami Imseih recommended the existing BackendPidGetProc()/AuxiliaryPidGetProc() fallback pattern #2 #3 #4.
- Heikki instead proposed moving wait_event_info into PgBackendStatus because auxiliary processes now have status entries, making wait events part of the activity snapshot and potentially reducing contention #5.
- Bertrand Drouvot questioned PGPROC alignment after the relocation, Heikki initially favored a separate investigation, and Andres Freund argued for deliberate cache-line layout while warning that the new field could increase contention in the backend-status array #6 #7 #13.
- Sami supported the relocation and suggested comment improvements, subsequently withdrawing an apparent unused-function concern caused by his rebase; Rahila Syed also supported consolidating the PID lookup helpers #8 #10 #11.
- Andres cautioned that unsynchronized wait-event updates inherently permit inconsistencies; Sami reported improved sampling results without adding synchronization, and Heikki explained the snapshot-consistency benefits while leaving their precise guarantees unsettled #12 #14 #15.
- Heikki committed the original bugfix with its lookup logic replaced by Sami's straightforward fallback in 78a5e3074b, backpatching through PostgreSQL 14 because the broader storage relocation was unsuitable for stable branches #16.
- At the thread's end, the auxiliary-process reporting bug was fixed, while moving wait events into PgBackendStatus and consolidating PID lookup remained proposed follow-up work #16.