- A logical dump is commands: create the tables, load the rows, set the counters, add the keys; pg_restore runs a custom archive, psql runs plain SQL.
- A dump is not restored into a working database:
CREATEandCOPYfail, whilesetvalgoes through and rolls the counter back. - Testing a dump means restoring it into a new, empty database and comparing it with the original: rows,
md5, the counter. - The new order at the start of the lesson failed because of the counter: pg_restore set
orders_id_seqback to yesterday's 5, and the database handed out the taken id 6.
Step 7 of 7 · summary · 2 min
Summary
Found an inaccuracy? Report an error in the lesson