2

pg_upgrade (formerly called pg_migrator) allows data stored in PostgreSQL data files to be upgraded to a later PostgreSQL major version without the data dump/reload typically required for major version upgrades, e.g., from 9.5.8 to 9.6.4 or from 10.7 to 11.2.

Source: https://www.postgresql.org/docs/12/pgupgrade.html

My related questions:

  1. So if there's this nice, sleek pg_upgrade tool to do this in a much nicer and quicker way, why would anyone ever want to go through the whole dump/restore ordeal? I never knew about the existence of this until recently, and now I feel "something" for wasting so much time and effort when I could've just done a simple command.
  2. I'm not sure why they call it "dump/reload" here. Isn't it "dump/restore"?

1 Answer 1

4

You can't use pg_upgrade on machines of different architecture. Or even just different available encoding/collations. You also can't use it to take multiple databases under different clusters, and put them under one. Or vice versa, break multiple databases under one cluster apart.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.