~/talk

PostgreSQL Replication Conflicts: Avoiding Pitfalls

Talkat PGConf NYC 2022 · 2022-09-22..09-23· [databases, observability]
slides:none on file

Demo uses PostgreSQL 14.1 on CentOS 7 with a single primary and standby and shows two reproducible failures: a lock conflict when a standby transaction touches a table and the primary drops it after max_standby_streaming_delay = 30s, and a snapshot conflict when the primary VACUUMs rows the standby cursor still reads. Observability relies on pg_stat_activity/pg_locks and pg_stat_database conflicts counters; mitigation recommendations are increase wal_keep_size, tune streaming delay, consider hot_standby_feedback, and use PG Stat Monitor to persist transient diagnostics.

AI-written summary · about

  1. 0:00Introduction
  2. 1:55Contact Hamid
  3. 2:12PostgreSQL Community Forum
  4. 3:02PostgreSQL SPGstatMonitor
  5. 5:01Outline
  6. 5:44Lightweight locks
  7. 5:54Spin locks
  8. 8:52Heavyweight locks
  9. 9:30Write ahead log
  10. 9:46Bright red log
  11. 11:57Wall files
  12. 13:58LSN
  13. 15:27History
  14. 19:41Synchronous
  15. 21:06Replication Views
  16. 22:50Conflicts
  17. 23:37Configuration Parameters
  18. 27:36Replication Conflicts
  19. 28:52Survey Results
  20. 29:28Key Issues
  21. 30:12Conflict Types
  22. 31:11Lock vs Snapshot
  23. 31:51Environment
  24. 33:46Under the Hood
  25. 35:13Understanding Your Workload
  26. 36:48Snapshot Conflict
  27. 37:51Database Conflict
  28. 38:04Code
  29. 38:51Vacuum
  30. 39:59Closing Thoughts
  31. 41:22Thank You
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.