When following the steps from APM 10.x - How to manual upgrade PostgreSQL 9.6.2 to 13.4 and higher versions? to upgrade PostgreSQL the following error is encountered.
When the following command is run:
/usr/pgsql-13/bin/pg_upgrade -b /opt/apm/postgres/PostgreSQL-9.6.2/bin -B /usr/pgsql-13/bin -d /opt/apm/postgres/PostgreSQL-9.6.2/data -D /opt/apm/pgsql/13/data
The error below is received:
Performing Consistency Checks-----------------------------Checking cluster versions okChecking database user is the install user okChecking database connection settings okChecking for prepared transactions okChecking for system-defined composite types in user tables okChecking for reg* data types in user tables okChecking for contrib/isn with bigint-passing mismatch okChecking for tables WITH OIDS okChecking for invalid "sql_identifier" user columns okChecking for invalid "unknown" user columns okCreating dump of global objects okCreating dump of database schemas ok
New cluster database "cemdb" is not empty: found relation "public.ts_app_auth_types"Failure, exiting
Release : 10.7.0
pg_upgrade reports that the new cluster is not empty, please empty the new cluster. The target cluster may not contain any user-defined databases.Please see the following PostgreSQL community webisite for more information. pg_upgrade Troubleshooting