timeline-history-file · shipping · also WAL timeline history file

Timeline history file (PostgreSQL)

A PostgreSQL timeline history file records ancestor timelines and WAL switchpoints used to select the appropriate log history during recovery.

Related Observatory article: Timeline history file (PostgreSQL) on hesela.com

The child timeline's .history file inherits its parent's history and adds the parent ID, switchpoint LSN and reason. PostgreSQL 18.0 writes parent IDs in decimal within entries; the filename encodes the child ID in hexadecimal. Timeline 1 has no preceding branch and normally has no history file. [1]

The replication command TIMELINE_HISTORY retrieves a specified timeline's filename and contents. This metadata identifies history, not the availability or integrity of all required WAL segments. [2]

Keep this ancestry metadata distinct from a backup manifest's required WAL intervals. A history file helps select the branch; it is not an inventory proving that its segments are retrievable. [1]

Relations

related
PostgreSQL timeline, WAL archiving, Point-in-time recovery, Log sequence number, Backup manifest

Citations

  1. PostgreSQL 18.0: timeline history reader and writer (accessed 2026-10-20)
  2. PostgreSQL 18: IDENTIFY_SYSTEM and TIMELINE_HISTORY (accessed 2026-10-20)

Further reading

  1. Hesela: Replication acknowledgements: received, durable, applied (accessed 2026-10-20)

JSON: /data/terms/timeline-history-file.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Timeline history file (PostgreSQL). Hesela. 2026-10-21. https://hesela.dev/terms/timeline-history-file/