Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XKI2p-000379-TZ for pgsql-admin@arkaria.postgresql.org; Thu, 21 Aug 2014 02:24:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XKI2o-0003lD-DN for pgsql-admin@arkaria.postgresql.org; Thu, 21 Aug 2014 02:24:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XKI2n-0003l6-A7 for pgsql-admin@postgresql.org; Thu, 21 Aug 2014 02:24:05 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XKI2i-00054n-Ps for pgsql-admin@postgresql.org; Thu, 21 Aug 2014 02:24:03 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1XKI2h-0000AK-IP; Wed, 20 Aug 2014 22:23:59 -0400 Date: Wed, 20 Aug 2014 22:23:59 -0400 From: Bruce Momjian To: Craig James Cc: "pgsql-admin@postgresql.org" Subject: Re: pg_upgrade FAIL: can't find tablespaces Message-ID: <20140821022359.GA26706@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On Mon, Aug 18, 2014 at 12:15:57PM -0700, Craig James wrote: > > > On Mon, Aug 18, 2014 at 11:59 AM, Craig James 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 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