Re: Running pg_upgrade under Debian - Mailing list pgsql-general

From rob stone
Subject Re: Running pg_upgrade under Debian
Date
Msg-id 1429580773.16380.5.camel@gmail.com
Whole thread Raw
In response to Re: Running pg_upgrade under Debian  (Bruce Momjian <bruce@momjian.us>)
List pgsql-general


On Mon, 2015-04-20 at 18:05 -0400, Bruce Momjian wrote:
> On Mon, Apr 20, 2015 at 03:02:48PM -0700, Adrian Klaver wrote:
> > >But pg_upgrade supports tablespaces, and I assume pg_dump/pg_restore do
> > >as well.
> > >
> >
> > I don't think it is about the underlying programs, it is about
> > teaching the wrapper script what do with the choices. Sort of like
> > pgAdmin not supporting all pg_backup/pg_restore combinations or for
> > that matter pg_restore not knowing what to do with a plain text
> > pg_dump file.
>
> Understoo, but I was not aware there was anything special required for
> pg_upgrade to support tablespaces.
>



pg_dump will handle tablespaces when you create a sql style dump file.
However, you have to alter one line where it sets default_tablespace to
null.
Obviously, when you run psql to read the dump file the tablespaces have
to exist. There is no create statement as it won't know where you want
to mount your tablespaces.

I've used my Plan "B". Ran pg_dump out of the 9.3 instance, altered that
one line, stopped 9.3, started 9.4, ran psql as the postgres user,
created the user and tablespaces and imported the dump file. It all
worked as intended. So, I now have one of my test databases running
under 9.4.

Cheers,
Robert



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Running pg_upgrade under Debian
Next
From: Craig Ringer
Date:
Subject: Re: monitoring bdr nodes