If you are upgrading a database instance that uses the extensions, follow the procedure below to upgrade according to the source product version.
When migrating from a database instance of FUJITSU Enterprise Postgres 10 or later
If you are using pg_upgrade to upgrade a database instance from FUJITSU Enterprise Postgres 10 or later that uses the extensions, follow the procedure below to upgrade.
Create a database cluster at the destination
Stop the source and destination instances
Run the pg_upgrade command
Start the destination instance
Update the extensions used with ALTER EXTENSION to the latest version at the destination
ALTER EXTENSION extensionName UPDATE;
If you are using multiple extensions, please update each extension separately.
See
For information about pg_upgrade and ALTER EXTENSION, refer to "Reference" in the PostgreSQL Documentation.
When migrating from a database instance of FUJITSU Enterprise Postgres 9.x
If you use pg_upgrade to upgrade a FUJITSU Enterprise Postgres 9.x database instance that uses the extensions, perform the following steps.
Before using pg_upgrade, remove the following extensions from all databases in the instance, except "template0":
pg_stat_statements
pgx_io
pgx_paging
pgx_network
pgx_network_err
pgx_cpu
pgx_memory
pgx_swap
pgx_disk
pgx_process
pgx_log
oracle_compatible
pg_dbms_stats
pg_hint_plan
For all databases except "template0", execute the following command to remove these extensions:
DROP EXTENSION extensionName;
Once the pg_upgrade operation is complete, for all databases except "template0", execute the following command to re-create these extensions as required:
CREATE EXTENSION extensionName;
See
For information about pg_upgrade, DROP EXTENSION and CREATE EXTENSION, refer to "Reference" in the PostgreSQL Documentation.
Note
It is strongly recommended to back up the database using pg_dump before performing pg_upgrade or using DROP EXTENSION.
If there are any columns created in the user tables using a data type from these extensions, then DROP EXTENSION will also drop these columns. Therefore, it is essential that alternate upgrade mechanisms are considered instead of pg_upgrade, in such scenarios. These may include pg_dump/pg_restore.