model-writtenrun 7879 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane proposed a backpatchable shutdown-hang fix in #1: represent worker requests that cannot be serviced as completed, allowing startup and shutdown waiters to exit without changing the existing APIs.
- Craig Ringer supported that behavior because callers already must handle workers exiting immediately, and suggested postmaster-context assertions in #2; those assertions were not included in the committed fix.
- Bharath Rupireddy reviewed the patch in #3, questioning signal-handler ordering, the identification of dynamic workers through BGW_NEVER_RESTART, and whether restartable workers could leave callers hanging.
- Tom Lane explained that postmaster signal handlers cannot interrupt each other, accepted moving worker-state processing after possible postmaster-state transitions, and deferred broader API redesign to preserve backpatchability in #4.
- After finding that autoprewarm waits for a restartable worker, Tom Lane broadened cancellation to pending workers with waiters and announced the fix in #5; 7519bd16d1 landed the patch from #1 with those logic changes, signal-handler reordering, notification-PID cleanup, and comment updates, backpatched through PostgreSQL 10.
- Craig Ringer thanked Tom Lane in #6, closing the thread with the shutdown-hang fix committed and broader background-worker API cleanup deferred.