From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | Joseph Kregloh <jkregloh(at)sproutloud(dot)com> |
Cc: | John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pg_upgrade & tablespaces |
Date: | 2013-12-21 00:14:23 |
Message-ID: | 52B4DD5F.7040602@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On 12/20/2013 02:01 PM, Joseph Kregloh wrote:
>
> [root(at)postgres-93-upgrade
> /usr/local/pgsql/data/drupal___dbspace]# ls -la
> /home/jkregloh/pg_data/data/__drupal_dbspace/
> drwx------ 4 pgsql pgsql 4 Oct 20 2011 PG_9.0_201008051
>
>
> So that looks like it worked, or am I missing something.
>
>
> Yes, it works but once it gets to the step where it creates the
> relations I get the error:
>
> Copying user relation files
> ...l/data/drupal_dbspace/PG_9.0_201008051/2752430/10913518
> error while copying relation "pg_catalog.pg_largeobject"
> ("/usr/local/pgsql/data/drupal_dbspace/PG_9.0_201008051/2752430/10913518"
> to "/usr/local/pgsql/data/drupal_dbspace/PG_9.3_201306121/16499/12301"): No
> such file or directory
Best guess is /home/jkregloh/pg_data/data/drupal_dbspace/ is pointing
back to /usr/local/pgsql/data in the other jail.
>
>
>
> Case B:
> pg_upgrade -b /home/jkregloh/pg_bin/ -B /usr/local/bin/ -D
> /usr/local/pgsql_93/data -d /usr/local/pgsql/data/ -P 5452 -p 5451
>
>
> You realize order of switches is not important, but case is, where
> lower case is old version, upper is new version. I mention this
> because the ports are switched again, assuming your previous
> statement is correct:
>
> " But the ports I am using are 5451 for 9.3 and 5452 for 9.0."
>
>
> Thanks for pointing this out. I reset and ran:
>
> pg_upgrade -b /home/jkregloh/pg_bin/ -B /usr/local/bin/ -D
> /usr/local/pgsql_93/data -d /usr/local/pgsql/data/ -p 5452 -P 5451
>
> Same results as I posted previously for Case B.
>
>
> [pgsql(at)postgres-93-upgrade
> /usr/local/pgsql_93/data/__drupal_dbspace]$ ls
> -la /usr/local/pgsql/data/drupal___dbspace/
> drwx------ 4 pgsql pgsql 4 Oct 20 2011 PG_9.0_201008051
> drwx------ 3 pgsql pgsql 3 Dec 20 16:44 PG_9.3_201306121
>
>
> To me this looks crossed wires, possibly from the crossed ports above.
>
> What has me confused is where /usr/local/pgsql_93/data comes from?
> Did you actually install a Postgres 9.3 instance there?
> Or is the 9.3 instance installed in the location in Case A
> /usr/local/pgsql/data/ ?
>
>
> For Case B I switch it around the /usr/local/pgsql/data belongs to 9.0
> and /usr/local/pgsql_93/data belongs to 9.3. This I found allows me to
> not get the same error as I do in Case A.
>
> /usr/local/pgsql_93/data is the data dir of the 9.3 cluster, created
> using /usr/local/bin/initdb -D /usr/local/pgsql_93/data
And /usr/local/pgsql was re-initdbed with a 9.0 cluster, because
previously it was the 9.3 cluster?
And you are sure /usr/local/bin has the 9.3 binaries?
Personally I would say at this point the relationships between versions
are so confused it would seem best to start from scratch.
My suggestions:
1) Create a new jail with a copy of the test 9.0 cluster located in
/usr/local/pgsql.
2) In that jail install a new 9.3 cluster using the --prefix= switch to
configure to have it install in a different location in the jail.
3) Use pg_upgrade.
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | David Johnston | 2013-12-21 00:15:43 | Re: Seems like bug in 9.1.3, need to confirm. |
Previous Message | Tom Lane | 2013-12-21 00:12:47 | Re: Seems like bug in 9.1.3, need to confirm. |
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2013-12-21 00:37:11 | Re: pg_upgrade & tablespaces |
Previous Message | Andres Freund | 2013-12-20 23:27:44 | Re: nested hstore patch |