Re: pg_upgrade & tablespaces

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Joseph Kregloh <jkregloh(at)sproutloud(dot)com>, John R Pierce <pierce(at)hogranch(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_upgrade & tablespaces
Date: 2013-12-19 23:19:32
Message-ID: 52B37F04.4030701@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 12/19/2013 01:50 PM, Joseph Kregloh wrote:
> On Thu, Dec 19, 2013 at 4:14 PM, John R Pierce <pierce(at)hogranch(dot)com
> <mailto:pierce(at)hogranch(dot)com>> wrote:
>
> On 12/19/2013 1:06 PM, Joseph Kregloh wrote:
>
> It's easier to keep things segregated. It is not anymore
> different than doing the upgrade in the same jail. Which at the
> end of the day you are doing the upgrade in the same jail,
> because at the end of the day pg_upgrade just needs the old data
> an binary to start and create some dump files.
>
>
> pg_upgrade needs to access the old data AND all the tablespaces at
> the same paths as the old server sees them AND the new data and
> tablespaces at the same path as the NEW server sees them. if the
> two servers are in different jails, I don't see how you could make
> that work... if you run pg_upgrade in the host system, then all the
> paths are different for both sets of data and tablespaces.
>
>
> I understand that it will need to access the old data and new data data
> as it sees it, but it is seeing everything as /usr/local/pgsql/data. Now
> lets say I have both versions 9.0 and 9.3 installed in the same jail.
> They will both need to use /usr/local/pgsql/data to access the physical
> data. But that will not work because all of the Postgres related files
> are in there, so you can only have 9.0 OR 9.3 use the
> /usr/local/pgsql/data directory.

No, that is not the case. The data directory can be different for
different instances, it is a configure option. In fact the pg_upgrade
docs point that out:

http://www.postgresql.org/docs/9.3/interactive/pgupgrade.html

See:

Usage

Steps 1-3

>
>
>
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2013-12-20 00:48:29 Re: Multi Master Replication
Previous Message Joseph Kregloh 2013-12-19 21:55:34 Re: pg_upgrade & tablespaces

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2013-12-19 23:40:11 XML Issue with DTDs
Previous Message Sergey Konoplev 2013-12-19 23:13:25 Re: Hot standby 9.2.6 -> 9.2.6 PANIC: WAL contains references to invalid pages