Upgrade considerations v15
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. 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_upgradeto 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, as described below.
- Export all of your data using
pg_dump. - Install the new release.
- Run
initdbto create a new cluster. - Import your old data.
Consider the following when upgrading EDB Postgres Advanced Server:
- The
pg_upgradeutility can't upgrade a partitioned table if a foreign key refers to the partitioned table. - If you perform an upgrade of the EDB Postgres Advanced Server installation, you must rebuild any hash-partitioned table on the upgraded server.
- If you're using an ODBC, JDBC, OCI, or .NET driver to connect to your database applications and upgrading to a new major version of EDB Postgres Advanced Server, upgrade your driver to the latest version when upgrading EDB Postgres Advanced Server.