Re: pg_upgrade & tablespaces

From: Joseph Kregloh <jkregloh(at)sproutloud(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(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:25:23
Message-ID: CAAW2xfey1dq2xHLhpC+O-Evdj5NJ6kaNOyXOcQeY-eu+1gRyUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

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

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?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message peterlen 2013-12-31 20:45:05 Format of Pioint datatype.... lat/long or long/lat??
Previous Message bricklen 2013-12-31 19:18:22 Re: How to list current user and database in PSQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2013-12-31 20:32:16 Re: proposal: multiple read-write masters in a cluster with wal-streaming synchronization
Previous Message Mark Dilger 2013-12-31 19:59:10 proposal: multiple read-write masters in a cluster with wal-streaming synchronization