~/talk

Optimizing Postgres for write heavy workloads ft. Checkpoint and WAL configs

Talkat Citus Con: An Event for Postgres 2023 · 2023-04-18..04-19· [databases]
slides:none on file

Explains concrete knobs and measurements: autovacuum threshold defaults to 0.2 and often needs lowering to 0.02 or 0.002 for heavy writes; WAL tuning recommends checkpoint_timeout 5m default but 15–30m common and setting max_wal_size roughly 2–3× the WAL generated per timeout so time‑based checkpoints dominate. Recommends wal_buffers increase (16MB → ~128MB), enable WAL compression, watch full_page_writes (can raise WAL volume by an order of magnitude), and tune bgwriter (bgwriter_delay, lru_multiplier, bgwriter_lru_maxpages) to shift IO off critical paths.

AI-written summary · about

  1. 0:00Introduction
  2. 1:41Making sure Postgres setup is good
  3. 3:31Writing performant applications for PG
  4. 6:07Optimizing writes in Postgres
  5. 8:10Autovacuum, Checkpointer, and Bgwriter
  6. 20:33WAL tuning parameters
  7. 24:04Tuning Background Writer
~/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.