~/talk

Scaling PostgreSQL Beyond Query Optimization

Talkat XO Ruby Atlanta 2025 · on Saturday, 2025-09-13· [databases, ruby]
links:none on file
slides:none on file

Postgres performance improves when concrete settings change: set shared_buffers 25–40% and effective_cache_size 50–75%, lower random_page_cost toward ~1.5, and expect queries to sometimes become orders of magnitude faster (one table saw ~100× improvement). Reduce autovacuum defaults (autovacuum_scale_factor from 0.2 to ~0.01–0.05, and autovacuum_analyze_scale_factor to ≤5%) to avoid bloat and near–XID wraparound, and enforce timeouts (statement_timeout ~≤5s, idle_in_transaction_session_timeout) to kill long transactions. These adjustments measurably tame recurring production spikes.

AI-written summary · about

  1. 0:00Introduction
  2. 5:27PostgreSQL config defaults
  3. 12:32Tune autovacuum
  4. 18:55Avoid long transactions
  5. 24:23Summary
~/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.