Re: pg_upgrade & tablespaces

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Joseph Kregloh <jkregloh(at)sproutloud(dot)com>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_upgrade & tablespaces
Date: 2013-12-31 20:57:20
Message-ID: 52C32FB0.3060609@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 12/31/2013 12:25 PM, Joseph Kregloh wrote:
> I did a bit more experimenting today. First test:
>
> /opt/bin/pg_upgrade -d /usr/local/pgsql/data -D
> /usr/local/pgsql_93/data/ -b /usr/local/bin/ -B /opt/bin/ -p 5452 -P 5451
>
> It completes successfully, however I still have the user defined
> tablespaces inside the 9.0 data folder. So I manually moved all
> tablespaces into the new 9.3 data directory. Then I deleted the 9.0 data
> directory and renamed the 9.3 directory to /usr/local/pgsql/data. Now
> the tablespaces are in the correct location and using the 9.3 data
> folder. The server starts up just fine. On pgAdmin if I view the tables
> the data shows up, but if I do a SELECT I get:
>
> ERROR: relation "sys_errors" does not exist
> LINE 1: SELECT * FROM sys_errors ORDER BY created_ts DESC LIMIT 100;
> ^
> ********** Error **********
>
> ERROR: relation "sys_errors" does not exist
> SQL state: 42P01
> Character: 15

sys_errors is a table in the tablespace correct?

>
> The second test, using the exact same pg_upgrade line. But this time I
> updated the location of the tablespaces to outside the /data directory.
> I updated pg_tablespace and re-created all symlinks. Now the data
> directory doesn't contain the tablespaces. Again pg_upgrade completes
> successfully and again I get the same error about the relation.
>
> Any thoughts?

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-12-31 21:06:55 Re: Format of Pioint datatype.... lat/long or long/lat??
Previous Message peterlen 2013-12-31 20:45:05 Format of Pioint datatype.... lat/long or long/lat??

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-12-31 21:01:34 Re: Get more from indices.
Previous Message Tom Lane 2013-12-31 20:44:35 Re: proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure