Breakout Session
summary
Detailed postmortems of streaming replication lag with concrete fixes and measurable failures: monitoring both time lag and byte lag, using pg_stat_replication, iostat and graphs, and automating slot cleanup; root causes include NTP clock skew, HDD IO spikes on xlog partitions, a hand-misset async/sync that stopped replication, and replication slots filling disks; observed spikes up to ~30 seconds and a one-off ~500s anomaly; explains hot standby feedback tradeoffs causing master bloat and how replication slots change xlog retention, with scripts and HA config that end up working.
AI-written summary · about
chapters (18)
- 0:00Start
- 1:17Monitoring 101 Cacti, Nagios, Zabbix + pagerduty
- 1:47What is Normal?
- 2:32Time V Bytes
- 4:49is replication paused?
- 5:04Byte Measurement
- 6:55Most issues are in the initial setup phase.
- 7:222. Hardware
- 8:46Traffic Isolation: separate host with alternate configuration
- 9:21Reporting Slaves
- 9:58Don't Forget: Remove Replication Slots For Decommissioned Slaves
- 11:33replication_timeout
- 12:44hot_standby_feedback
- 14:18max_standby_streaming_delay
- 15:36SSD xlogs & trim
- 21:39Slave Time - Master Time
- 22:56What have you experienced?
- 38:32The End
related talks
48mPostgreSQL Replication: 20 Pitfalls and Solutions
51mPostgreSQL Replication Conflicts: Avoiding Pitfalls
25mWaiting for Commit
42mPostgreSQL Replication Conflicts: Avoiding Pitfalls
22mSecuring Postgres with streaming replication
42mlesser known Superpower of Postgres Logical Replication
49mDebugging and Troubleshooting PostgreSQL Streaming Replication
51mPostgreSQL Replication Conflicts: Avoiding Pitfalls
