ObservabilitybeginnerPro runbook

Catch a high transaction rollback rate

xact_rollback against xact_commit is a one-line health check nobody runs. Here 200 of 506 transactions rolled back, 39.5%, and every single one was the same duplicate key.

Problem

What you're actually looking at

The symptom as it shows up on a real server.

Applications swallow errors. A retry loop that fails four times out of ten still looks fine from the outside, while the database burns transaction IDs, WAL and connection time on work that is thrown away. pg_stat_database counts it for you at no cost.

An importer feeding tracking_barcodes re-sends barcodes it has already loaded. Nothing alerts, because from the application's point of view the import 'completes'.

Simple terms

Applications quietly swallow errors, so a retry loop failing four times out of ten can look perfectly healthy from the outside while the database wastes transaction IDs, WAL, and connection time on work it throws away. Comparing rolled-back transactions against committed ones is a one-line health check almost nobody runs, and a high rollback rate usually points straight at one repeating error, like the same duplicate key over and over.

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 catch a high transaction rollback 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