Storage glossary · JSON corpus · llms.txt · hesela.com

torn-write · shipping · also partial page write

Torn write

A torn write is an interrupted write that persists only part of its intended update, potentially leaving a database page with mixed old and new contents.

A database page may span several storage write units, so a page write cannot automatically be treated as atomic. PostgreSQL documents full-page images as protection for recovery from this failure. Transaction atomicity and page-write atomicity describe different boundaries. Torn-write protection permits the complete old value instead of a mixture; it does not by itself make the replacement durable. Linux RWF_ATOMIC requests this protection for one supported direct-I/O range.

Relations

related
full-page-write, write-ahead-log, crash-consistency, power-loss-protection, rwf-atomic, statx-write-atomic, raid-write-hole, lost-write

Limitations

Citations

  1. PostgreSQL 18: Reliability (accessed 2026-10-11)
  2. PostgreSQL 18: WAL settings (accessed 2026-10-11)
  3. WAL, checkpoints and torn pages: three different recovery guarantees (accessed 2026-10-11)
  4. Linux man-pages 6.19, readv(2): RWF_ATOMIC (accessed 2026-10-12)
  5. Linux atomic writes: untorn does not mean durable (accessed 2026-10-12)

JSON: /data/terms/torn-write.json