How to Ride Elephants Safely: Working with PostgreSQL when your DBA is not around
summary
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
chapters (10)
- 0:00PostgreSQL basics
- 3:52Start/stop safely
- 8:30Connect with psql
- 11:21Monitor activity/logs
- 15:16Configuring settings
- 27:12VACUUM operations
- 31:50Backups with pg_dump
- 34:39Monitoring PostgreSQL logs effectively
- 39:34Slow queries with EXPLAIN
- 45:25Performance tips








