~/talk

How to Ride Elephants Safely: Working with PostgreSQL when your DBA is not around

Talkat DjangoCon US 2023 · 2023-10-16..10-20· [databases]
github:richyen
slides:none on file

Survival checklist for when a DBA is absent: how to start/stop Postgres with systemctl or pg_ctl, connect with psql, inspect activity via pg_stat_activity and cancel or terminate problematic backends, and read logs (WAL uses 16MB segments). Backup options include pg_dump (logical) and pg_basebackup (binary). Diagnose slow queries with EXPLAIN ANALYZE and fix them with indexes, work_mem tuning and VACUUM/autovacuum; example shows a scan dropping from ~45ms to ~0.8ms after adding an index.

AI-written summary · about

  1. 0:00PostgreSQL basics
  2. 3:52Start/stop safely
  3. 8:30Connect with psql
  4. 11:21Monitor activity/logs
  5. 15:16Configuring settings
  6. 27:12VACUUM operations
  7. 31:50Backups with pg_dump
  8. 34:39Monitoring PostgreSQL logs effectively
  9. 39:34Slow queries with EXPLAIN
  10. 45:25Performance tips
~/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.