pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Fortin <alexander.fortin@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Can't get pg_upgrade work for 8.4
Date: Tue, 20 Dec 2011 16:11:23 +0100
Message-ID: <4EF0A59B.9080202@gmail.com> (raw)

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@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@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/



view thread (3+ messages)  latest in thread

Message-ID: <4EF0A59B.9080202@gmail.com>
Permalink:  ../4EF0A59B.9080202@gmail.com/
Also on:    postgresql.org/message-id/4EF0A59B.9080202@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: alexander.fortin@gmail.com
  Subject: Re: Can't get pg_upgrade work for 8.4
  In-Reply-To: <4EF0A59B.9080202@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox