Glossary — in plain language

Logical Sequence Number (LSN)


In plain English

An LSN is an address into the WAL — a steadily increasing number that marks an exact position in the write-ahead log. PostgreSQL uses it to say “the replica has received up to here” or “recover up to this point”.

Why it matters

LSNs are how you measure replication lag (difference between primary and replica LSN) and define point-in-time recovery targets. They appear all over monitoring queries.

Was this helpful?

← Browse the full glossary