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 21:39:08
Message-ID: 52C3397C.7060003@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 12/31/2013 01:31 PM, Joseph Kregloh wrote:
>
> 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?
>
>
> Yes it is.

So you have not upgraded the tablespaces. What is important to remember
is Postgres uses numbers to keep track of relations. Part of the upgrade
process involves changing the numbers that point at relations. By
manually dropping a 9.0 tablespace into a 9.3 data directory you have
broken that system. You need to let pg_upgrade do the translation. See
my previous message below for a possible solution:

http://www.postgresql.org/message-id/52BDE16D.4090601@gmail.com

>
>
> 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 <mailto:adrian(dot)klaver(at)gmail(dot)com>
>
>

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joseph Kregloh 2013-12-31 21:51:22 Re: pg_upgrade & tablespaces
Previous Message Joseph Kregloh 2013-12-31 21:31:02 Re: pg_upgrade & tablespaces

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2013-12-31 21:51:08 Re: proposal: multiple read-write masters in a cluster with wal-streaming synchronization
Previous Message Joseph Kregloh 2013-12-31 21:31:02 Re: pg_upgrade & tablespaces