model-writtenrun 7881 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- John Thompson reported that stopping PostgreSQL 12.5 during initial autoprewarming could hang shutdown until the autoprewarm master was forcibly killed #1.
- Tom Lane traced the hang to launching another database worker after the postmaster stopped accepting requests and supplied a patch that checks for shutdown, preserves autoprewarm.blocks after interrupted loading, and suppresses the success log; he noted that a narrow worker-launch race remained in the background-worker infrastructure #2.
- Tom Lane committed the patch #2 unchanged as ff769831e0, with backports through PostgreSQL 11, leaving the broader background-worker redesign outside this fix.
- After committing, Tom Lane corrected his earlier claim that the HEAD patch worked on PostgreSQL 12: it applied but failed to compile, so he pointed to the adapted PostgreSQL 12 backport for testing #3.
- John Thompson confirmed that his equivalent PostgreSQL 12 adaptations fixed the problem in testing #4, and Tom Lane acknowledged the confirmation, closing the thread with the fix landed and tested #5.