00 /What You Will Learn
By the end you will be able to
- Explain asynchronous and synchronous replication, and what each risks.
- Read
pg_stat_replication.sync_stateand aSyncRepwait event. - Explain why a commit that is waiting is not visible to other sessions.
- Use
SET LOCAL synchronous_commit = localfor a write that does not need the wait. - Place async and sync on PACELC (PA/EL and PC/EC).
Before you start
Finish Lab 23 (Replication Lag and Stale Reads) first. You should know what a primary and a replica are. Docker Desktop must be running.