An exported snapshot includes customer 1 and order 10. A later committed related pair changes the source count to 2 and 2, while the dump restores 1 and 1 with no orphan order.

pg_dump captures a consistent snapshot

pg_dump exports one PostgreSQL database using a consistent view of transactional data, even while other sessions commit changes. This prevents the ordinary table-by-table copy problem in which related tables reflect different committed states. The snapshot is only part of the backup contract: the archive must also be complete for its intended scope, readable by compatible tools, and successfully restored into a usable database. ...

January 14, 2028 · 5 min · XB Field Notes