Invoking pg_upgrade v17

When invoking pg_upgrade, you must specify the location of the old and new cluster's PGDATA and executable (/bin) directories, the name of the EDB Postgres Advanced Server superuser, and the ports on which the installations are listening. A typical call to invoke pg_upgrade to migrate from EDB Postgres Advanced Server 15 to EDB Postgres Advanced Server 16 takes the form:

pg_upgrade
--old-datadir <path_to_15_data_directory>
--new-datadir <path_to_16_data_directory>
--user <superuser_name>
--old-bindir <path_to_15_bin_directory>
--new-bindir <path_to_16_bin_directory>
--old-port <15_port> --new-port <15_port>

Where:

--old-datadir path_to_15_data_directory

Use the --old-datadir option to specify the complete path to the data directory in the EDB Postgres Advanced Server 15 installation.

--new-datadir path_to_16_data_directory

Use the --new-datadir option to specify the complete path to the data directory in the EDB Postgres Advanced Server 16 installation.

--username superuser_name

Include the --username option to specify the name of the EDB Postgres Advanced Server superuser. The superuser name must be the same in both versions of EDB Postgres Advanced Server. By default, when EDB Postgres Advanced Server is installed in Oracle mode, the superuser is named enterprisedb. If installed in PostgreSQL mode, the superuser is named postgres.

If the EDB Postgres Advanced Server superuser name isn't the same in both clusters, the clusters won't pass the pg_upgrade consistency check.

--old-bindir path_to_15_bin_directory

Use the --old-bindir option to specify the complete path to the bin directory in the EDB Postgres Advanced Server 15 installation.

--new-bindir path_to_16_bin_directory

Use the --new-bindir option to specify the complete path to the bin directory in the EDB Postgres Advanced Server 16 installation.

--old-port 15_port

Include the --old-port option to specify the port on which EDB Postgres Advanced Server 15 listens for connections.

--new-port 16_port

Include the --new-port option to specify the port on which EDB Postgres Advanced Server 16 listens for connections.

command_line_options_reference