Postgres Replication and HA

From wiki.vacula.xyz

This mostly focuses on async streaming replication on Postgres 15.

Important notes:

  • Every transaction is added to a log called a write ahead log or WAL.
  • WAL files are transferred from the primary to the secondary.

Important config options:

  • wal_keep_size: # of WAL segments to keep