In this article
Atomic checkpoint publication prevents a crash from leaving an invalid prepared-state file; coordinator outcome recovery remains a separate contract.
PostgreSQL 18.7 fixes checkpoint persistence of state files for pending prepared transactions. A crash could previously leave an invalid file that prevented subsequent database startup. The important contract is atomic publication of durable transaction state, not merely eventual file creation. This patch concerns recovery readability of the local state file; the coordinator’s decision about committing or rolling back a prepared transaction remains a separate distributed-transaction responsibility.
Durable state must be valid at every crash boundary
The release names a crash leaving an invalid state file rather than a missing transaction decision. A proposed fault-injection test interrupts checkpoint publication and restarts the server, then inspects prepared-transaction state. Waiting for a fully completed checkpoint before crashing would omit the vulnerable interval. This is a qualification plan, not an executed production experiment. The evidence should identify the interruption point and resulting recovery behavior rather than only the existence of a file on disk.
Startup failure is an operational consequence
An invalid file could prevent the database from starting after the original crash. That means a maintenance-looking persistence race can extend an outage into recovery. A proposed test should preserve startup diagnostics and process outcome, not just report that the restart command was issued. The patch does not provide a recovery-time benchmark or guarantee that all other causes of failed startup disappear. Its contribution is removing this specific malformed-state-file path.
Prepared does not mean safe to decide locally
After successful recovery, a prepared transaction may legitimately remain pending until its coordinator supplies the authoritative outcome. A test should not automatically commit or abort it merely to clear the inventory. Compare identity and expected prepared state with the controlled transaction setup. This preserves the separation between durable local representation and distributed agreement. The release fixes the representation boundary; it does not change the application protocol that determines the final transaction decision.
Qualify checkpoint persistence separately from abort ordering
The same release also prevents checkpoints during prepared-transaction abort, but atomic file publication is a distinct fix. Passing an abort test does not establish crash-safe state-file creation, and the reverse is equally true. Keep the interruption and expected recovery state explicit for each. The practical result here is a valid durable prepared-state representation across checkpoint crashes, with post-recovery transaction resolution still governed by its coordinator and normal operational procedures.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.