model-writtenrun 3667 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund reported autoprewarm leader crashes during shutdown that did not fail the pg_prewarm tests, raising both a crash bug and inadequate shutdown-error detection #1.
- Nathan Bossart traced the crash to DSM segments being detached before on_shmem_exit callbacks and supplied an inline fix moving apw_detach_shmem to before_shmem_exit #3.
- Andres requested a control-file check after shutdown #4, and Nathan incorporated it alongside an explanatory callback-order comment in the sole attached patchset #6.
- Nathan suggested generalizing the control-file check to TAP node shutdowns #6, while Alexander Lakhin proposed preserving postmaster.pid after abnormal shutdowns #7; Andres approved the patch and favored generic checking with exceptions, but opposed preserving the PID file because it could obstruct restarts #9 #10.
- Álvaro Herrera questioned whether recovery could hide the crash from the new test #11; Nathan confirmed that removing the fix left the control-file state as 'in production' and showed shutdown logs without recovery, then noted that test initialization disables restart_after_crash #12 #13.
- Alexander demonstrated a broader limitation: an injected walsender assertion could still leave the control-file state as 'shut down', supporting his request for pg_ctl stop to detect shutdown errors #14.
- Nathan committed the attached patch unchanged as bcd5b4bcbe and announced completion #15, fixing autoprewarm and adding its targeted regression check while leaving generic TAP shutdown checking for future work.
- The thread ended with Andres explaining that crashes after the checkpointer updates the control file require stronger detection, suggesting additional states set by the postmaster and reiterating his objection to retaining postmaster.pid; broader shutdown-error handling remained unresolved #16.