Search Postgresql Archives

Re: Running pg_upgrade under Debian

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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



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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux