Re: pg_upgrade & tablespaces

From: Joseph Kregloh <jkregloh(at)sproutloud(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(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-20 22:01:47
Message-ID: CAAW2xfdGmfkfk9Tfzwbm3X-rtXP-UZD-A6L+zAqgGf4BS0rcFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> [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

>
>
>> 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

>
> The rest of the message I will leave alone as I pretty sure you are seeing
> the results of a crossed install.
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2013-12-20 22:59:04 Re: window function and order by
Previous Message Torsten Förtsch 2013-12-20 20:46:26 window function and order by

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2013-12-20 22:11:41 Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE
Previous Message Heikki Linnakangas 2013-12-20 21:12:49 Re: INSERT...ON DUPLICATE KEY LOCK FOR UPDATE