Upgrading an installation with pg_upgrade v15
While minor upgrades between versions are fairly simple and require only installing new executables, past major version upgrades were both expensive and time consuming. pg_upgrade
eases migration between any version of EDB Postgres Advanced Server (version 9.0 or later) and any later release of EDB Postgres Advanced Server that's supported on the same platform.
Without pg_upgrade
, to migrate from an earlier version of EDB Postgres Advanced Server to the newest version:
- Export all of your data using
pg_dump
. - Install the new release.
- Run
initdb
to create a new cluster. - Import your old data.
Note
pg_upgrade
can reduce both the amount of time and the disk space required for many major-version upgrades.
The pg_upgrade
utility performs an in-place transfer of existing data between EDB Postgres Advanced Server and any later version.
Several factors determine if an in-place upgrade is practical:
- The on-disk representation of user-defined tables must not change between the original version and the upgraded version.
- The on-disk representation of data types must not change between the original version and the upgraded version.
- To upgrade between major versions of EDB Postgres Advanced Server with
pg_upgrade
, both versions must share a common binary representation for each data type. Therefore, you can't usepg_upgrade
to migrate from a 32-bit to a 64-bit Linux platform.
Before performing a version upgrade, pg_upgrade
verifies that the old cluster and the new cluster are compatible.
If the upgrade involves a change in the on-disk representation of database objects or data, or if it involves a change in the binary representation of data types, pg_upgrade
can't perform the upgrade. To upgrade, you have to pg_dump
the old data and then import that data to the new cluster.
The pg_upgrade
executable is distributed with EDB Postgres Advanced Server and is installed as part of the Database Server component. You don't need to further install or configure it.
performing_an_upgrade invoking_pg_upgrade upgrading_to_advanced_server upgrading_a_pgAgent_installation pg_upgrade_troubleshooting reverting_to_the_old_cluster