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

log-sequence-number · shipping · also LSN

Log sequence number

A log sequence number identifies a position in an engine's ordered recovery-log address space.

PostgreSQL represents an LSN as a byte offset in WAL. Insert, write and durable-flush positions have different meanings: knowing an LSN does not establish that its record is durable. A byte distance is not elapsed time; retain the engine, timeline and observed progress stage when comparing positions.

Relations

related
write-ahead-log, database-checkpoint

Citations

  1. PostgreSQL 18: WAL Internals (accessed 2026-10-12)
  2. PostgreSQL 18: Backup Control Functions, Table 9.97 and notes (accessed 2026-10-12)
  3. WAL, checkpoints and torn pages: three different recovery guarantees (accessed 2026-10-12)

JSON: /data/terms/log-sequence-number.json