model-writtenrun 5739 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nathan Bossart reported Linux DROP TABLESPACE failures exposed by his WAL pre-allocation patches and asked whether USE_BARRIER_SMGRRELEASE was needed because enabling it or adding a sleep suppressed the failures #1.
- Thomas Munro explained that closing file descriptors should not fix Unix unlink behavior, then used diagnostic logging to establish that the leftover file survived the requested checkpoint and was deleted during the following checkpoint #2 #3.
- Andres Freund suggested better file diagnostics and investigating the affected relation, while Nathan and Andres identified changed regression-test scheduling as a possible trigger for a pre-existing problem #4 #5 #6 #7.
- Nathan diagnosed unlink requests being absorbed after SyncPreCheckpoint() advanced the cycle counter, then proposed absorbing them before that increment and moving SyncPreCheckpoint() outside the critical section #8 #9.
- Nathan explored placing the extra absorb after checkpoint-start notification in CheckpointerMain(), supplied that alternative patch, and demonstrated the failure without his WAL pre-allocation changes using a deliberately delayed checkpoint #10 #11.
- Andres questioned the alternative's subsystem placement and single-user-mode behavior and suggested reconsidering the separate checkpoint counters; Nathan confirmed reproduction back to PostgreSQL 9.3, attributed the barrier's apparent benefit to timing, and favored returning to the original placement #12 #13.
- Nathan restored the original implementation with clearer comments and a fuller commit message, leaving the counter redesign and CheckpointerMain() alternative out of the final patch #14.
- Thomas committed #14 as 46d9bfb0a6 with only comment wrapping and base-context differences, announced back-patches with adaptations before PostgreSQL 12, and Nathan's closing thanks left the reported race resolved #15 #16.