Subject: pg_upgrade invalid option

From: Thom Brown <[email-masked]>
Date: Fri, 11 Jun 2010 14:50:45 +0100

I've tried following the instructions on this page:
http://www.postgresql.org/files/documentation/books/aw_pgsql/node267.html

This mentions a -f option but my version of pg_upgrade doesn't appear
to support this:

/usr/lib64/postgresql-9.0/bin/pg_upgrade: invalid option -- 'f'

The only options available are:

Options:
 -b, --old-bindir=old_bindir      old cluster executable directory
 -B, --new-bindir=new_bindir      new cluster executable directory
 -c, --check                      check clusters only, don't change any data
 -d, --old-datadir=old_datadir    old cluster data directory
 -D, --new-datadir=new_datadir    new cluster data directory
 -g, --debug                      enable debugging
 -G, --debugfile=debug_filename   output debugging activity to file
 -k, --link                       link instead of copying files to new cluster
 -l, --logfile=log_filename       log session activity to file
 -p, --old-port=old_portnum       old cluster port number (default 5432)
 -P, --new-port=new_portnum       new cluster port number (default 5432)
 -u, --user=username              clusters superuser (default "postgres")
 -v, --verbose                    enable verbose output
 -V, --version                    display version information, then exit
 -h, --help                       show this help, then exit

Are those instructions for an older version?

Thanks

Thom

---

From: Dave Page <[email-masked]>
Date: Fri, 11 Jun 2010 14:55:40 +0100

> The only options available are:
<snip>

> Are those instructions for an older version?

That's Bruce's book which is probably 8 or 9 years old now. It's
almost certainly referring to the old pg_upgrade shell script from
years ago.

-- 
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Postgres Company

---

From: Thom Brown <[email-masked]>
Date: Fri, 11 Jun 2010 15:01:11 +0100

> almost certainly referring to the old pg_upgrade shell script from

Ah, unfortunately that's the first result in Google.  I've resorted to
restoring from a full backup :(  I don't think I could use it for
upgrading from beta 1 to beta 2 anyway by the looks of things.  The
binary directories are updated since they share the same version
number.

Thom

---

From: Bruce Momjian <[email-masked]>
Date: Sat, 12 Jun 2010 13:15:31 -0400 (EDT)

> Ah, unfortunately that's the first result in Google.  I've resorted to

I am sure that will change soon.  :-)  The right URL is now #7 on
Google:

	http://developer.postgresql.org/pgdocs/postgres/pgupgrade.html

> binary directories are updated since they share the same version

You certainly could have.  The docs say:

	F.31.1. Supported Versions
	
	pg_upgrade supports upgrades from 8.3.X and later to the current major
	release of PostgreSQL, including snapshot and alpha releases. 

In fact, we were hoping people would test pg_upgrade during the required
beta2 catalog change.

-- 
  Bruce Momjian  <[email-masked]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + None of us is going to be here forever. +

---

From: Thom Brown <[email-masked]>
Date: Sat, 12 Jun 2010 18:43:10 +0100

> In fact, we were hoping people would test pg_upgrade during the required

How would that work if the beta1 binaries are overwritten by the beta2
binaries since they both share the same version number?

Thom

---

From: Bruce Momjian <[email-masked]>
Date: Sat, 12 Jun 2010 13:46:34 -0400 (EDT)

Thom Brown wrote:
> > I am sure that will change soon. ?:-) ?The right URL is now #7 on
> > Google:
> >
> > ? ? ? ?http://developer.postgresql.org/pgdocs/postgres/pgupgrade.html
> >
> >> restoring from a full backup :( ?I don't think I could use it for
> >> upgrading from beta 1 to beta 2 anyway by the looks of things. ?The
> > You certainly could have. ?The docs say:
> >
> > ? ? ? ?F.31.1. Supported Versions
> >
> > ? ? ? ?pg_upgrade supports upgrades from 8.3.X and later to the current major
> > ? ? ? ?release of PostgreSQL, including snapshot and alpha releases.
> >

Uh, did you look at the URL I mentioned.  I talks about renaming the old
directory before installing the new installation, if necessary.

---

From: Thom Brown <[email-masked]>
Date: Sat, 12 Jun 2010 18:58:31 +0100

> directory before installing the new installation, if necessary.

Ah, I see.  Unfortunately it still wouldn't have helped since I had
already installed the new beta.  Normally it installs versions in
parallel, but not in this case. :/  Had I planned it before
installation, I would have ensured the binaries were moved beforehand.

Nevermind. :)

Thom