51 ms·
According to the release notes, dump/restore is not necessary to get to 12 — pg_upgrade works.
by wrs 7y ago
According to the release notes, dump/restore is not necessary to get to 12 — pg_upgrade works.
- throw0101a 7y agoYou're generating a new set of data files, which IMHO is the same principle. (There's nothing wrong with this, it's just telling folks you can't just drop in a bin bin/postgres and run it blindly.)
- petergeoghegan 7y agoThat's not how pg_upgrade works or has ever worked. The only data files that are regenerated are those used for system catalogs. The policy change for version numbers more or less happened because we could never justify bumping the most significant number for the latest stable release. It had become meaningless.
- takeda 7y agoThat was never true for major version upgrades: e.g. 9.4.x -> 9.5.x 9.5.x -> 9.6.x 9.6.x -> 10.x (they changed versioning since 10.x) 10.x -> 11.x 11.x -> 12.x and so on You couldn't just drop new version and assume it will work, the database needed to be converted to new format, pg_upgrade tool was created for this operation. By default it generates a new database in new folder. There's also a flag that uses hard link for files that didn't change between versions (it usually only takes a minute or less), but with the caveat that if upgrade is not successful and you run the new version of the database, you'll have to use backup to restore old version (since the new version might modify the files). There's also pg_dump/pg_restore, but this is the slowest way.