doublewrite-buffer · shipping · also InnoDB doublewrite, innodb_doublewrite

Doublewrite buffer

An InnoDB doublewrite buffer stages data-page copies before their final file writes so crash recovery can repair an incomplete page write.

Related Observatory article: Doublewrite buffer on hesela.com

MySQL 8.4 ON and DETECT_AND_RECOVER preserve page content, while DETECT_ONLY preserves metadata without repair bytes. Changes among these enabled modes can be dynamic, but switching between an enabled mode and OFF cannot. [4]

In mysql-8.4.0, reduced entries contain tablespace ID, page number and LSN. Recovery can fail on a corrupt page when no full copy has repaired it. A recorded page identity is not a recovery image. [3]

Redo logging remains separate: it records changes for replay, whereas the staged page supplies reconstruction material. A successfully repaired page does not decide whether its transaction committed. [2] [5]

Relations

related
torn-write, full-page-write, write-ahead-log, database-checkpoint, crash-consistency

Advantages

Limitations

Citations

  1. MySQL 8.4: Doublewrite Buffer, page-copy recovery and batched writes (accessed 2026-10-16)
  2. MySQL 8.4: Redo Log, recovery records and checkpoint progress (accessed 2026-10-16)
  3. MySQL mysql-8.4.0: buf0dblwr.cc, reduced_recover and page recovery (accessed 2026-10-16)
  4. MySQL 8.4: InnoDB variables, innodb_checksum_algorithm and innodb_doublewrite (accessed 2026-10-16)
  5. MySQL 8.4: InnoDB Recovery, redo application and background transaction rollback (accessed 2026-10-16)

Further reading

  1. Hesela: WAL, checkpoints and torn pages, InnoDB doublewrite (accessed 2026-10-16)
Sources & caveats

JSON: /data/terms/doublewrite-buffer.json