Can't get pg_upgrade work for 8.4

From: Alexander Fortin <alexander(dot)fortin(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Can't get pg_upgrade work for 8.4
Date: 2011-12-20 15:11:23
Message-ID: 4EF0A59B.9080202@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi folks.

I've been struggling a while with 9.1.2 pg_upgrade on Ubuntu 10.04.3,
but I can't find a way out so I've subscribed to this ML, I hope it's
the right place.

So, I've got an 8.4 (Ubuntu packaged) postgresql cluster that needs to
be upgraded to 9.1

I can't use the Ubuntu packaged v9.1.1 because of a bug with pg_upgrade
(cfr
http://postgresql.1045698.n5.nabble.com/Problem-with-pg-upgrade-9-0-gt-9-1-td4813453.html)

so I'm going with a compiled 9.1.2, but seems there's another problem,
but because of pg_ctl this time. This is what happens:

postgres(at)box:~/8.4/main$ /usr/local/postgresql-9.1.2/bin/pg_upgrade
--old-bindir=/usr/lib/postgresql/8.4/bin/
--new-bindir=/usr/local/postgresql-9.1.2/bin/ --check
--old-datadir=/var/lib/postgresql/8.4/main/
--new-datadir=/var/lib/postgresql/8.4/main/main9.1/ --link
--logfile=/tmp/logging_pgupgrade --old-port=5432 --new-port=15432 --verbose
Running in verbose mode
Performing Consistency Checks on Old Live Server
------------------------------------------------
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
Checking for large objects ok
"/usr/local/postgresql-9.1.2/bin/pg_ctl" -w -l "/tmp/logging_pgupgrade"
-D "/var/lib/postgresql/8.4/main/main9.1" -o "-p 15432 -b" start >>
"/tmp/logging_pgupgrade" 2>&1
Checking for prepared transactions ok
Checking for presence of required libraries ok

*Clusters are compatible*
"/usr/local/postgresql-9.1.2/bin/pg_ctl" -w -l "/tmp/logging_pgupgrade"
-D "/var/lib/postgresql/8.4/main/main9.1" stop >>
"/tmp/logging_pgupgrade" 2>&1

This works, but only if I previously started up the 8.4 cluster.

Than, I want to run it without the --check options. So I stop the 8.4
cluster (otherwise pg_upgrade will complain), and this is where I get stuck:

postgres(at)box:~/8.4/main$ /usr/local/postgresql-9.1.2/bin/pg_upgrade
--old-bindir=/usr/lib/postgresql/8.4/bin/
--new-bindir=/usr/local/postgresql-9.1.2/bin/
--old-datadir=/var/lib/postgresql/8.4/main/
--new-datadir=/var/lib/postgresql/8.4/main/main9.1/ --link
--logfile=/tmp/logging_pgupgrade --old-port=5432 --new-port=15432 --verbose
Running in verbose mode
Performing Consistency Checks
-----------------------------
Checking current, bin, and data directories ok
Checking cluster versions ok
"/usr/lib/postgresql/8.4/bin/pg_ctl" -w -l "/tmp/logging_pgupgrade" -D
"/var/lib/postgresql/8.4/main" -o "-p 5432 -c autovacuum=off -c
autovacuum_freeze_max_age=2000000000" start >> "/tmp/logging_pgupgrade" 2>&1
There were problems executing "/usr/lib/postgresql/8.4/bin/pg_ctl" -w -l
"/tmp/logging_pgupgrade" -D "/var/lib/postgresql/8.4/main" -o "-p 5432
-c autovacuum=off -c autovacuum_freeze_max_age=2000000000" start >>
"/tmp/logging_pgupgrade" 2>&1

pg_ctl failed to start the old server
Failure, exiting

Now, the 8.4 cluster actually does get started by the above pg_ctl
command, but seems that the -w option is somehow broken (note that the
packaged Ubuntu postgresql 8.4 doesn't use pg_ctl but pg_ctlcluster
instead), causing pg_upgrade to fail.

Any suggestion on how to fix this? Thank you very much for you time,
best wishes

--
Alexander Fortin
http://about.me/alexanderfortin/

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jens Wilke 2011-12-20 17:06:06 Re: PG export/import encoding issue
Previous Message Greg Smith 2011-12-20 13:49:28 Re: Giving postgres roles 'sudo'-like access