model-writtenrun 4230 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Heikki Linnakangas demonstrated that creating an empty table in a tablespace on a separate virtual disk, checkpointing, and crashing could leave the relation file missing, and proposed registering an fsync request in mdcreate() for non-temporary relations #1.
- Andres Freund examined why filesystem metadata flushing could conceal the bug, suggested an assertion-build fsync validation layer, and raised possible special handling for unlogged tables and relations synced through other paths; these suggestions did not change the attached fix #2.
- Thomas Munro tested the patch and confirmed that checkpoint now fsynced the new relation, but observed that its containing directory was still not synchronized #7.
- Heikki questioned whether file creation and relation deletion also required directory fsync #8, Andres explained why relying on filesystem behavior was uncertain #9, and Thomas agreed that directory durability could be addressed separately #10.
- Thomas further identified possible storage leaks and resurrected relation segments after crashes, proposing checkpoint synchronization of truncated tombstones and containing directories; those broader deletion concerns remained outside this patch #11.
- After roughly seventeen months, Daniel Gustafsson supplied a trivial rebase of Heikki's patch to accommodate the forknum parameter spelling and restore CI testing, preserving the original logic #12.
- Heikki committed the rebased code unchanged as 4b4798e138, documenting directory fsync as a separate issue, and confirmed that the fix had been pushed to all supported branches, including the newly created PostgreSQL 16 stable branch #13.