Обсуждение: Unable to upgrade old cluster from 8.4 to 9.0

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

Unable to upgrade old cluster from 8.4 to 9.0

От
Boris
Дата:
Hello,

I have Debian Linux (unstable) server, and I am trying to upgrade 8.4 version
database to 9.0, all developer packages for both versions were installed, as
well as client ( postgresql-server-dev-8.4
postgresql-client-8.4 postgresql-server-dev-9.0 postgresql-client-9.0).

Here is the command I use

/usr/lib/postgresql/9.0/bin/pg_upgrade -d -c /var/lib/postgresql/8.4/main/ -D
/var/lib/postgresql/9.0/main/ -b /usr/lib/postgresql/8.4/bin/ -B
/usr/lib/postgresql/9.0/bin/ --user=postgres

output is as follows:

Performing Consistency Checks
-----------------------------
Checking old data directory (-c)
check for base failed:  No such file or directory


I stopped server as it was suggested in upgrade manual
(http://developer.postgresql.org/pgdocs/postgres/pgupgrade.html)
All data directories are exist:

$ ls -lha /var/lib/postgresql/8.4/main/
total 72K
drwx------ 11 postgres postgres 4.0K Sep 22 23:25 .
drwxr-xr-x  3 root     root     4.0K Sep 22 23:03 ..
drwx------ 11 postgres postgres 4.0K Feb 13  2010 base
drwx------  2 postgres postgres 4.0K Sep 21 15:41 global
drwx------  2 postgres postgres 4.0K Mar  4  2010 pg_clog
drwx------  4 postgres postgres 4.0K Dec  3  2009 pg_multixact
drwx------  2 postgres postgres 4.0K Sep 21 15:41 pg_stat_tmp
drwx------  2 postgres postgres 4.0K Sep 12 00:58 pg_subtrans
drwx------  2 postgres postgres 4.0K Dec  3  2009 pg_tblspc
drwx------  2 postgres postgres 4.0K Dec  3  2009 pg_twophase
-rw-------  1 postgres postgres    4 Dec  3  2009 PG_VERSION
drwx------  3 postgres postgres 4.0K Sep 18 13:26 pg_xlog
-rw-r--r--  1 postgres postgres  17K Sep 22 23:25 postgresql.conf
-rw-------  1 postgres postgres  133 Sep 15 21:01 postmaster.opts
lrwxrwxrwx  1 root     root       36 Dec  3  2009 server.crt ->
/etc/ssl/certs/ssl-cert-snakeoil.pem
lrwxrwxrwx  1 root     root       38 Dec  3  2009 server.key ->
/etc/ssl/private/ssl-cert-snakeoil.key


$ ls -lha /var/lib/postgresql/9.0/main/
total 76K
drwx------ 12 postgres postgres 4.0K Sep 23 13:34 .
drwxr-xr-x  3 postgres postgres 4.0K Sep 21 15:49 ..
drwx------  6 postgres postgres 4.0K Sep 22 22:51 base
drwx------  2 postgres postgres 4.0K Sep 23 13:34 global
drwx------  2 postgres postgres 4.0K Sep 21 15:49 pg_clog
drwx------  4 postgres postgres 4.0K Sep 21 15:49 pg_multixact
drwx------  2 postgres postgres 4.0K Sep 23 11:52 pg_notify
drwx------  2 postgres postgres 4.0K Sep 23 13:34 pg_stat_tmp
drwx------  2 postgres postgres 4.0K Sep 21 15:49 pg_subtrans
drwx------  2 postgres postgres 4.0K Sep 21 15:49 pg_tblspc
drwx------  2 postgres postgres 4.0K Sep 21 15:49 pg_twophase
-rw-------  1 postgres postgres    4 Sep 21 15:49 PG_VERSION
drwx------  3 postgres postgres 4.0K Sep 21 15:49 pg_xlog
-rw-r--r--  1 postgres postgres  18K Sep 22 23:27 postgresql.conf
-rw-------  1 postgres postgres  133 Sep 23 11:52 postmaster.opts
lrwxrwxrwx  1 root     root       36 Sep 22 23:00 server.crt ->
/etc/ssl/certs/ssl-cert-snakeoil.pem
lrwxrwxrwx  1 root     root       38 Sep 22 23:00 server.key ->
/etc/ssl/private/ssl-cert-snakeoil.key



Can anyone please give some advice why pg_upgrade fails to uprage old cluster to
new one?





Re: Unable to upgrade old cluster from 8.4 to 9.0

От
Sandeep Srinivasa
Дата:
There is already a bug filed for this:

According to mpitt (the maintainer), the supported upgrade path is to use pg_upgradecluster



On Thu, Sep 23, 2010 at 3:21 PM, Boris <sw0rdf1sh_i@yahoo.com> wrote:
Hello,

I have Debian Linux (unstable) server, and I am trying to upgrade 8.4 version
database to 9.0, all developer packages for both versions were installed, as
well as client ( postgresql-server-dev-8.4
postgresql-client-8.4 postgresql-server-dev-9.0 postgresql-client-9.0).

Here is the command I use

/usr/lib/postgresql/9.0/bin/pg_upgrade -d -c /var/lib/postgresql/8.4/main/ -D
/var/lib/postgresql/9.0/main/ -b /usr/lib/postgresql/8.4/bin/ -B
/usr/lib/postgresql/9.0/bin/ --user=postgres

output is as follows:

Performing Consistency Checks
-----------------------------
Checking old data directory (-c)
check for base failed:  No such file or directory


I stopped server as it was suggested in upgrade manual
(http://developer.postgresql.org/pgdocs/postgres/pgupgrade.html)
All data directories are exist:

$ ls -lha /var/lib/postgresql/8.4/main/
total 72K
drwx------ 11 postgres postgres 4.0K Sep 22 23:25 .
drwxr-xr-x  3 root     root     4.0K Sep 22 23:03 ..
drwx------ 11 postgres postgres 4.0K Feb 13  2010 base
drwx------  2 postgres postgres 4.0K Sep 21 15:41 global
drwx------  2 postgres postgres 4.0K Mar  4  2010 pg_clog
drwx------  4 postgres postgres 4.0K Dec  3  2009 pg_multixact
drwx------  2 postgres postgres 4.0K Sep 21 15:41 pg_stat_tmp
drwx------  2 postgres postgres 4.0K Sep 12 00:58 pg_subtrans
drwx------  2 postgres postgres 4.0K Dec  3  2009 pg_tblspc
drwx------  2 postgres postgres 4.0K Dec  3  2009 pg_twophase
-rw-------  1 postgres postgres    4 Dec  3  2009 PG_VERSION
drwx------  3 postgres postgres 4.0K Sep 18 13:26 pg_xlog
-rw-r--r--  1 postgres postgres  17K Sep 22 23:25 postgresql.conf
-rw-------  1 postgres postgres  133 Sep 15 21:01 postmaster.opts
lrwxrwxrwx  1 root     root       36 Dec  3  2009 server.crt ->
/etc/ssl/certs/ssl-cert-snakeoil.pem
lrwxrwxrwx  1 root     root       38 Dec  3  2009 server.key ->
/etc/ssl/private/ssl-cert-snakeoil.key


$ ls -lha /var/lib/postgresql/9.0/main/
total 76K
drwx------ 12 postgres postgres 4.0K Sep 23 13:34 .
drwxr-xr-x  3 postgres postgres 4.0K Sep 21 15:49 ..
drwx------  6 postgres postgres 4.0K Sep 22 22:51 base
drwx------  2 postgres postgres 4.0K Sep 23 13:34 global
drwx------  2 postgres postgres 4.0K Sep 21 15:49 pg_clog
drwx------  4 postgres postgres 4.0K Sep 21 15:49 pg_multixact
drwx------  2 postgres postgres 4.0K Sep 23 11:52 pg_notify
drwx------  2 postgres postgres 4.0K Sep 23 13:34 pg_stat_tmp
drwx------  2 postgres postgres 4.0K Sep 21 15:49 pg_subtrans
drwx------  2 postgres postgres 4.0K Sep 21 15:49 pg_tblspc
drwx------  2 postgres postgres 4.0K Sep 21 15:49 pg_twophase
-rw-------  1 postgres postgres    4 Sep 21 15:49 PG_VERSION
drwx------  3 postgres postgres 4.0K Sep 21 15:49 pg_xlog
-rw-r--r--  1 postgres postgres  18K Sep 22 23:27 postgresql.conf
-rw-------  1 postgres postgres  133 Sep 23 11:52 postmaster.opts
lrwxrwxrwx  1 root     root       36 Sep 22 23:00 server.crt ->
/etc/ssl/certs/ssl-cert-snakeoil.pem
lrwxrwxrwx  1 root     root       38 Sep 22 23:00 server.key ->
/etc/ssl/private/ssl-cert-snakeoil.key



Can anyone please give some advice why pg_upgrade fails to uprage old cluster to
new one?





--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: Unable to upgrade old cluster from 8.4 to 9.0

От
Thom Brown
Дата:
On 23 September 2010 10:51, Boris <sw0rdf1sh_i@yahoo.com> wrote:
> Hello,
>
> I have Debian Linux (unstable) server, and I am trying to upgrade 8.4 version
> database to 9.0, all developer packages for both versions were installed, as
> well as client ( postgresql-server-dev-8.4
> postgresql-client-8.4 postgresql-server-dev-9.0 postgresql-client-9.0).
>
> Here is the command I use
>
> /usr/lib/postgresql/9.0/bin/pg_upgrade -d -c /var/lib/postgresql/8.4/main/ -D
> /var/lib/postgresql/9.0/main/ -b /usr/lib/postgresql/8.4/bin/ -B
> /usr/lib/postgresql/9.0/bin/ --user=postgres

The -d and -c options appear to be the wrong way round.  Looks like
you're passing -c as the parameter for -d.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

Re: Unable to upgrade old cluster from 8.4 to 9.0

От
Bruce Momjian
Дата:
Thom Brown wrote:
> On 23 September 2010 10:51, Boris <sw0rdf1sh_i@yahoo.com> wrote:
> > Hello,
> >
> > I have Debian Linux (unstable) server, and I am trying to upgrade 8.4 version
> > database to 9.0, all developer packages for both versions were installed, as
> > well as client ( postgresql-server-dev-8.4
> > postgresql-client-8.4 postgresql-server-dev-9.0 postgresql-client-9.0).
> >
> > Here is the command I use
> >
> > /usr/lib/postgresql/9.0/bin/pg_upgrade -d -c /var/lib/postgresql/8.4/main/ -D
> > /var/lib/postgresql/9.0/main/ -b /usr/lib/postgresql/8.4/bin/ -B
> > /usr/lib/postgresql/9.0/bin/ --user=postgres
>
> The -d and -c options appear to be the wrong way round.  Looks like
> you're passing -c as the parameter for -d.

Yep, that is it.  In fact the error message confirms it:

    Checking old data directory (-c)
    check for base failed:  No such file or directory

It thinks the old data directory is "-c".

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

  + It's impossible for everything to be true. +