ObservabilitybeginnerPro runbook

Monitor COPY progress during a bulk load

COPY reports its row count only when it commits. pg_stat_progress_copy gives you bytes against the file size while it runs, 5,248 kB of 371 MB at the first sample, 201 MB and 54.1% a little later.

Problem

What you're actually looking at

The symptom as it shows up on a real server.

A large COPY gives you no feedback at all. On a multi-gigabyte load that means you cannot tell a slow import from a stalled one, and you cannot give anyone an honest estimate of when the table will be usable.

A 371 MB export is being loaded into consignment_import ahead of a cutover. The load is the critical path and someone needs a percentage, not a shrug.

Simple terms

A big COPY import gives you no feedback at all until it commits, so on a multi-gigabyte load you cannot tell a slow import from a stalled one. pg_stat_progress_copy reports the bytes processed against the file size while it is still running, so you can turn a shrug into an honest percentage and a real estimate of when the table will be ready.

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 monitor copy progress during a bulk load, 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

Connected

How this connects to the rest of the library

A live view of this page's real cross-references, what explains it, what fixes it, what to tune, and where to go next. Every link is an authored relationship, not a guess.

Open in the interactive map →
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