From: | Bryan Murphy <bmurphy1976(at)gmail(dot)com> |
---|---|
To: | PGSQL Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | pg_upgrade from 9.0.7 to 9.1.3: duplicate key pg_authid_oid_index |
Date: | 2012-05-31 20:55:45 |
Message-ID: | CAP+1M2f-jaaQ87=ZcrVxHwQh7Xg+F+ijhyy7wdiiGmcg1=fP4g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
I'm having a problem upgrading a cluster from 9.0.7 to 9.1.3. Here's the
error:
psql:/srv/pg_upgrade_dump_globals.sql:54: ERROR: duplicate key value
violates unique constraint "pg_authid_oid_index"
DETAIL: Key (oid)=(10) already exists.
Any ideas what I'm doing wrong?
Here's the verbose output from pg_upgrade:
$ /opt/postgresql-9.1/bin/pg_upgrade --link --verbose
--old-datadir=/srv/postgresql/pg_data --new-datadir=/srv/postgres-9.1
--old-bindir=/opt/postgresql-9.0/bin --new-bindir=/opt/postgresql-9.1/bin
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories ok
Checking cluster versions ok
"/opt/postgresql-9.0/bin/pg_ctl" -w -l "/dev/null" -D
"/srv/postgresql/pg_data" -o "-p 5432 -c autovacuum=off -c
autovacuum_freeze_max_age=2000000000" start >> "/dev/null" 2>&1
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
"/opt/postgresql-9.1/bin/pg_dumpall" --port 5432 --username "postgres"
--schema-only --binary-upgrade > "/srv/pg_upgrade_dump_all.sql"
ok
"/opt/postgresql-9.0/bin/pg_ctl" -w -l "/dev/null" -D
"/srv/postgresql/pg_data" stop >> "/dev/null" 2>&1
"/opt/postgresql-9.1/bin/pg_ctl" -w -l "/dev/null" -D "/srv/postgres-9.1"
-o "-p 5432 -b" start >> "/dev/null" 2>&1
Checking for prepared transactions ok
Checking for presence of required libraries ok
| If pg_upgrade fails after this point, you must
| re-initdb the new cluster before continuing.
| You will also need to remove the ".old" suffix
| from /srv/postgresql/pg_data/global/pg_control.old.
Performing Upgrade
------------------
Adding ".old" suffix to old global/pg_control ok
Analyzing all rows in the new cluster
"/opt/postgresql-9.1/bin/vacuumdb" --port 5432 --username "postgres" --all
--analyze >> "/dev/null" 2>&1
ok
Freezing all rows on the new cluster
"/opt/postgresql-9.1/bin/vacuumdb" --port 5432 --username "postgres" --all
--freeze >> "/dev/null" 2>&1
ok
"/opt/postgresql-9.1/bin/pg_ctl" -w -l "/dev/null" -D "/srv/postgres-9.1"
stop >> "/dev/null" 2>&1
Deleting new commit clogs ok
Copying old commit clogs to new server cp -Rf
"/srv/postgresql/pg_data/pg_clog" "/srv/postgres-9.1/pg_clog"
ok
Setting next transaction id for new cluster
"/opt/postgresql-9.1/bin/pg_resetxlog" -f -x 743542427 "/srv/postgres-9.1"
> /dev/null
ok
Resetting WAL archives
"/opt/postgresql-9.1/bin/pg_resetxlog" -l 1,829,15 "/srv/postgres-9.1" >>
"/dev/null" 2>&1
ok
"/opt/postgresql-9.1/bin/pg_ctl" -w -l "/dev/null" -D "/srv/postgres-9.1"
-o "-p 5432 -b" start >> "/dev/null" 2>&1
Setting frozenxid counters in new cluster ok
Creating databases in the new cluster
"/opt/postgresql-9.1/bin/psql" --set ON_ERROR_STOP=on --no-psqlrc --port
5432 --username "postgres" -f "/srv/pg_upgrade_dump_globals.sql" --dbname
template1 >> "/dev/null"
psql:/srv/pg_upgrade_dump_globals.sql:54: ERROR: duplicate key value
violates unique constraint "pg_authid_oid_index"
DETAIL: Key (oid)=(10) already exists.
There were problems executing "/opt/postgresql-9.1/bin/psql" --set
ON_ERROR_STOP=on --no-psqlrc --port 5432 --username "postgres" -f
"/srv/pg_upgrade_dump_globals.sql" --dbname template1 >> "/dev/null"
Failure, exiting
"/opt/postgresql-9.1/bin/pg_ctl" -w -l "/dev/null" -D "/srv/postgres-9.1"
-m fast stop >> "/dev/null" 2>&1
Thanks,
Bryan
From | Date | Subject | |
---|---|---|---|
Next Message | John Townsend | 2012-05-31 20:57:54 | Re: Procedural Languages |
Previous Message | Mike Toews | 2012-05-31 20:13:28 | Re: Procedural Languages |
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2012-05-31 21:28:54 | Re: pg_upgrade from 9.0.7 to 9.1.3: duplicate key pg_authid_oid_index |
Previous Message | Kohei KaiGai | 2012-05-31 20:55:27 | Re: [RFC] Interface of Row Level Security |