Diagnostic step 1
Prefer taking logical dumps from a warm read replica: create a standby, run pg_dump there to avoid interfering with primary write workload. This is reversible and reduces contention.
Generated Oct 3, 2026, 12:35:03 AM
Prefer taking logical dumps from a warm read replica: create a standby, run pg_dump there to avoid interfering with primary write workload. This is reversible and reduces contention.
Use physical backups (pg_basebackup) or filesystem snapshots at the storage layer for large datasets where logical consistency across many tables is expensive; these are consistent by design for base backups and avoid serialization errors.
If a logical dump must run on primary, schedule it during the lowest-traffic window, reduce parallelism (avoid -j) to shorten the snapshot window, and increase application-side retry logic for transient serialization failures.
Consider using 'pg_dump --snapshot' carefully or switching to a tool designed for online logical backups that chunks tables to limit snapshot scope.
Investigate long-running transactions on the server ('SELECT pid, now() - xact_start AS age, query FROM pg_stat_activity WHERE state = ''active'';') and mitigate by optimizing or scheduling them off the backup window. Escalation: If you cannot provision a replica or serialization errors persist despite reduced concurrency, involve DBA for deeper analysis (query patterns, transaction isolation usage) and consider workload re-architecture or managed backup solutions.