
Overview of Postgres replication methods
● Postgres relies on WAL (write-ahead log) for transaction durability; all changes
(even uncommitted ones!) are written to disk as part of a WAL file
● Log-shipping moves entire WAL files from the primary to the standby using an out
of band process (archive_command/restore_command)
● Streaming replication moves individual WAL records over a connection between
primary and standby (walsender/walreceiver)
● Since there is minimal processing of these WAL files, both these methods are relatively
simple and pretty reliable. A lot of HA/replica setups use them.
● Since WAL is global, can’t control what changes you want to replicate.
https://www.postgresql.org/docs/current/warm-standby.html
3
相关文档
评论