Problems with pg_upgrade.

From: Bror Jonsson <brorfred(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Problems with pg_upgrade.
Date: 2014-07-29 16:31:38
Message-ID: 2B69ABB0-014A-4296-8D34-D2E83A84FA77@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Dear all,

I’m trying to upgrade from 9.0 to 9.2 with out any success. the pg_upgrade script fails with the message Old and new cluster install users have different values for pg_authid.oid:

geo-route-in:~ bror$ /opt/local//lib/postgresql92/bin/pg_upgrade -b /opt/local//lib/postgresql90/bin/ -B /opt/local//lib/postgresql92/bin/ -d /Volumes/ruoteRAID/db/postgresql90/defaultdb/ -D /Volumes/ruoteRAID/db/postgresql92/defaultdb/ -u bror
Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories ok
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 catalog dump ok
Checking for presence of required libraries ok
Checking database user is a superuser ok

Old and new cluster install users have different values for pg_authid.oid.
Failure, exiting

The only information about this error I could find in in the source code:

> https://github.com/postgres/postgres/blob/master/contrib/pg_upgrade/check.c


/*
* We don't restore our own user, so both clusters must match have
* matching install-user oids.
*/
if (old_cluster.install_role_oid != new_cluster.install_role_oid)
pg_fatal("Old and new cluster install users have different values for pg_authid.oid.\n");

/*
* We only allow the install user in the new cluster because other defined
* users might match users defined in the old cluster and generate an
* error during pg_dump restore.
*/
if (new_cluster.role_count != 1)
pg_fatal("Only the install user can be defined in the new cluster.\n");

check_for_prepared_transactions(&new_cluster);
}

pg_authid in the old db looks as follows:

bror=# SELECT * FROM pg_authid;
rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcatupdate | rolcanlogin | rolconnlimit | rolpassword | rolvaliduntil
----------+----------+------------+---------------+-------------+--------------+-------------+--------------+-------------+---------------
postgres | t | t | t | t | t | t | -1 | |
bror | t | t | t | t | t | t | -1 | |
django | f | t | f | f | f | t | -1 | |
(3 rows)

And in the new one:

SELECT * FROM pg_authid;
rolname | rolsuper | rolinherit | rolcreaterole | rolcreatedb | rolcatupdate | rolcanlogin | rolreplication | rolconnlimit | rolpassword | rolvaliduntil
---------+----------+------------+---------------+-------------+--------------+-------------+----------------+--------------+-------------+---------------
bror | t | t | t | t | t | t | t | -1 | |
(1 row)

Any suggestion for how to fix this?

Many thanks!

/Bror Jonsson

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Haas 2014-07-29 16:35:35 Re: Re: [GENERAL] pg_dump behaves differently for different archive formats
Previous Message Tobias Fielitz 2014-07-29 04:33:28 pgbouncer not finding pidfile