sudo -u postgres /usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.3/bin -d /data/postgres/9.1/main -D /data/postgres/9.3/main -o ' -c config_file=/etc/postgresql/9.1/main/postgresql.conf' -O ' -c config_file=/etc/postgresql/9.3/main/postgresql.conf'
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is a superuser ok
Checking for prepared transactions ok
Checking for reg* system OID user data types ok
Checking for contrib/isn with bigint-passing mismatch ok
Creating dump of global objects ok
Creating dump of database schemas
ok
New cluster database "flagstaff_subset" is not empty
Failure, exiting
I have no idea where to go from here. If anyone knows the root cause of this or has good instructions on upgrading from postgres 9.1 to 9.3, please let me know!
The cluster in
/data/postgres/9.3/main
is not a blank, newly initialized database cluster - it has a database namedflagstaff_subset
that contains data.You can only use a blank, newly initialized DB cluster as a target for
pg_upgrade
.