WAL & replicationintermediatePro runbook

Measure your WAL generation rate

pg_current_wal_lsn plus pg_wal_lsn_diff lets you measure exactly how much WAL a workload produces. Here 200,000 inserts generated 30 MB of WAL, the number that drives archiving, replication, and disk planning.

Problem

What you're actually looking at

The symptom as it shows up on a real server.

WAL volume drives replication bandwidth, archive storage, and pg_wal disk sizing, but it is invisible unless you measure it. Capturing the LSN before and after a workload and taking the difference gives you the exact bytes written.

Meridian wants to size WAL archiving and replication for a bulk-load pattern. Measuring the LSN delta across a 200,000-row insert gives a concrete WAL-per-operation figure to plan from.

Simple terms

WAL is the write-ahead log every change is recorded in, and its volume drives your replication bandwidth, your archive storage, and how big pg_wal needs to be, yet it is invisible unless you measure it. PostgreSQL exposes the current log position (the LSN); capture it before and after a workload, take the difference, and you have the exact number of bytes that workload wrote. That concrete figure is what you plan capacity from, instead of guessing.

ProCaptured evidence where the run produced it

Full runbook for this incident

The scenario above is free. What Pro unlocks is the fix: how to identify measure your wal generation rate, the exact SQL to trace it, PostgreSQL 18 output for the steps we captured, the resolution path, and how to stop it recurring.
  • The full identify checklist, the exact signals that tell you it's this incident
  • Every diagnostic query; lab output is attached only to the steps we actually captured
  • The resolution path and the pitfalls that make it worse
  • Mitigation steps to stop it recurring, plus a verify-you're-done query

Card required. Cancel before day 7 and you are not charged.

Compare plans

ShareLinkedInX

Need the full procedure?

Pro runbooks finish the incident path

Free runbooks teach the shape. Pro opens the full step transcript, edge cases, and prevention depth.

FollowSubstackLinkedInnew errors · lab notes · hiring loops