model-writtenrun 8957 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Grigory Smolkin reported that running out of disk space left state.tmp behind and broke logical replication, attaching a reproducer and a patch replacing O_EXCL with O_TRUNC under the existing exclusive lock #1.
- Michael Paquier initially preferred O_TRUNC for its small code change and preservation of temporary files for diagnosis, while separately raising concerns about handling fsync failures #2.
- Andres Freund opposed removing the O_EXCL safeguard and proposed unlinking the temporary file on failures that do not trigger crash recovery; Grigory questioned the overwrite risk under the exclusive lock #4 #5.
- Dmitry Vasiliev supplied production logs showing disk exhaustion followed by the existing-file error, and Grigory supplied a stronger reproducer demonstrating a failed state.tmp write followed by failed creation attempts #6 #7.
- Michael explained that checkpoint failures could merely log an error and leave state.tmp blocking future saves, but the exchange with Andres did not settle the implementation #8 #9.
- The thread ended in May 2020 with Alvaro Herrera asking whether the problem remained unfixed and Michael confirming that it still needed attention; no replacement patch or landing was reported here #10 #11.
- In October 2025, Michael committed the later patch #602666 from thread #52374 as 912af1c7e9, retaining O_EXCL and implementing the error-path cleanup Andres had suggested here, with backpatches through PostgreSQL 13.