Обсуждение: pg_upgrade invalid option

Поиск
Список
Период
Сортировка

pg_upgrade invalid option

От
Thom Brown
Дата:
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

Re: pg_upgrade invalid option

От
Thom Brown
Дата:
On 11 June 2010 14:55, Dave Page <dpage@pgadmin.org> wrote:
> On Fri, Jun 11, 2010 at 2:50 PM, Thom Brown <thombrown@gmail.com> wrote:
>> 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:
>>
> <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.
>

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

Re: pg_upgrade invalid option

От
Dave Page
Дата:
On Fri, Jun 11, 2010 at 2:50 PM, Thom Brown <thombrown@gmail.com> wrote:
> 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:
>
<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

Re: pg_upgrade invalid option

От
Bruce Momjian
Дата:
Thom Brown wrote:
> >> 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.
> >
>
> 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

> 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.

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  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

Re: pg_upgrade invalid option

От
Thom Brown
Дата:
On 12 June 2010 18:15, Bruce Momjian <bruce@momjian.us> wrote:
> Thom Brown wrote:
>> >> 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.
>> >
>>
>> 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
>
>> 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.
>
> 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.
>

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

Thom

Re: pg_upgrade invalid option

От
Bruce Momjian
Дата:
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
> >> binary directories are updated since they share the same version
> >> number.
> >
> > 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.
> >
>
> How would that work if the beta1 binaries are overwritten by the beta2
> binaries since they both share the same version number?

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

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

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

Re: pg_upgrade invalid option

От
Thom Brown
Дата:
On 12 June 2010 18:46, Bruce Momjian <bruce@momjian.us> wrote:
> 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
>> >> binary directories are updated since they share the same version
>> >> number.
>> >
>> > 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.
>> >
>>
>> How would that work if the beta1 binaries are overwritten by the beta2
>> binaries since they both share the same version number?
>
> Uh, did you look at the URL I mentioned.  I talks about renaming the old
> 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