pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Craig James <cjames@emolecules.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: pg_upgrade FAIL: can't find tablespaces
Date: Wed, 20 Aug 2014 22:23:59 -0400
Message-ID: <20140821022359.GA26706@momjian.us> (raw)
In-Reply-To: <CAFwQ8rc2DFOMU_eKqMFp=AJvLkuGby3V3XjnN33ME8=nU=uiTw@mail.gmail.com>
References: <CAFwQ8rcStOPG4mZoo6FNioHadEcB=6qxdpudU+eQskRJgGi0Ww@mail.gmail.com>
	<CAFwQ8rc2DFOMU_eKqMFp=AJvLkuGby3V3XjnN33ME8=nU=uiTw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

On Mon, Aug 18, 2014 at 12:15:57PM -0700, Craig James wrote:
> 
> 
> On Mon, Aug 18, 2014 at 11:59 AM, Craig James <cjames@emolecules.com> wrote:
> 
>     I did pg_upgrade from 8.4.17 to 9.3.5. The upgrade claimed it was
>     successful. However, when I start Postgres 9.3.5, I get an error message
>     for every one of the roughly 250 databases:
> 
>     LOG:  could not open tablespace directory "pg_tblspc/16828/
>     PG_9.3_201306121": No such file or directory
>     LOG:  could not open tablespace directory "pg_tblspc/16523/
>     PG_9.3_201306121": No such file or directory
>     LOG:  could not open tablespace directory "pg_tblspc/16768/
>     PG_9.3_201306121": No such file or directory
>     LOG:  could not open tablespace directory "pg_tblspc/16715/
>     PG_9.3_201306121": No such file or directory
>     ... and so forth
> 
>     My Postgres looks like this
> 
>        /data/postgres/main  - the PGDATA directory
>        /data/postgres/tablespaces - where most of the data live
> 
> 
> OK, I figured this out: pg_upgrade didn't follow symbolic links. Each of the
> missing files pointed to  /data/postgres/tablespaces, but the actual directory
> was in /data/postgres-8.4/tablespaces.  When I replaced /data/postgres/
> tablespaces with a symbolic link to /data/postgres-8.4/tablespaces, everything
> worked. 
> 
> Once everything is in order and I'm convinced 9.3.5 is working, I'll shut down,
> remove the symlink, and move the tablespaces directory to the new location.

Uh, I am not totally clear what happened here.  I am unclear how
pg_upgrade would have moved the files yet the new server would not
start.  Did you do anything between the completion of pg_upgrade and
trying to start the new server?

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (5+ messages)  latest in thread

Message-ID: <20140821022359.GA26706@momjian.us>
Permalink:  ../20140821022359.GA26706@momjian.us/
Also on:    postgresql.org/message-id/20140821022359.GA26706@momjian.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: bruce@momjian.us, cjames@emolecules.com
  Subject: Re: pg_upgrade FAIL: can't find tablespaces
  In-Reply-To: <20140821022359.GA26706@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox