PostgreSQL physical replication - internals, latest development and opportunities
summary
Primary and standby exchange WAL via WalSender and WAL receiver; WalSender reads WAL from disk and startup applies WAL files on standby. Recent changes: PG15 adds pre-fetch WAL data, PG16 fixes a standby startup crash, and PG17 plans allow WalSender to read WAL from buffers instead of always hitting files. Proposed improvements include sending WAL before local flush finishes (decoupling flush/apply), doing standby pre-processing so apply is faster, and exploring io_uring for networking to cut replication latency.
AI-written summary · about
chapters (5)
- 0:00Intro to speaker & topic
- 2:41Replication terminology
- 10:19How does physical replication work?
- 16:29Recent improvements in physical replication
- 18:38Opportunities for future improvements to physical replication
related talks
48mReplication Refresh
44mThe journey towards active-active replication in PostgreSQL
29mLogical replication theory and concepts
48mPostgreSQL Replication: 20 Pitfalls and Solutions
38mPostgres 16 highlight: Logical decoding on standby
22mSecuring Postgres with streaming replication
31mPostgreSQL WAL and Commit Synchronization, Optimization Opportunities
53mThe journey towards active replication in PostgreSQL
