DigiNews

Tech Watch by Johan Denoyer

← Back to articles

When upserts don't update but still write: Debugging Postgres performance at scale

Quality: 8/10 Relevance: 9/10

Summary

Datadog’s engineering post investigates why an upsert that should be a no-op still drives WAL writes and IOPS at scale. It documents the diagnostic process using pg_walinspect, the discovery that conflict resolution locks cause WAL activity even without updates, and the evolution from a standard ON CONFLICT DO UPDATE approach to a CTE-based pattern that reduces WAL overhead while preserving correctness.

🚀 Service construit par Johan Denoyer