When upserts don't update but still write: Debugging Postgres performance at scale
Datadog | The Monitor blog

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


Summary

Datadog engineers encountered unexpected performance degradation, including doubled disk writes and quadrupled WAL syncs, after implementing a new Postgres upsert to track host activity. Through investigation with `pg_walinspect`, they discovered that even when the query's `WHERE` clause prevented actual data updates, the `ON CONFLICT` mechanism was still recording row locks in the Write-Ahead Log.
Read the Original Article

This article originally appeared on Datadog | The Monitor blog.

Read Full Article on Original Site

Popular from Datadog | The Monitor blog

1
DASH 2026: Guide to Datadog’s newest announcements
DASH 2026: Guide to Datadog’s newest announcements

Datadog | The Monitor blog Jun 9, 2026 206 views

2
DASH 2026 Harnessing AI: Guide to Datadog’s newest announcements
DASH 2026 Harnessing AI: Guide to Datadog’s newest announcements

Datadog | The Monitor blog Jun 9, 2026 178 views

3
Datadog LLM Observability natively supports OpenTelemetry GenAI Semantic Conventions
4
Introducing Bits AI Dev Agent for Code Security
Introducing Bits AI Dev Agent for Code Security

Datadog | The Monitor blog Mar 26, 2026 108 views