Re: Can't upgrade a DB from 8.4 to 9.3 with pg_uprade: pg 9 not started

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Sebastien Douche <sdouche(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Can't upgrade a DB from 8.4 to 9.3 with pg_uprade: pg 9 not started
Date: 2014-02-14 02:15:51
Message-ID: 20140214021551.GB3244@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Feb 13, 2014 at 11:24:03PM +0100, Sebastien Douche wrote:
> Hi,
> I'm trying to upgrade a 8.4 DB (from Debian packages on Debian Lenny)
> to 9.3 (installation from source) with pg_upgrade. But he doesn't
> launch the new postmaster. Any ideas?
>
> postgres(at)SPV:~$ /opt/nova/current/nova/parts/pg93/bin/pg_upgrade -b
> /usr/lib/postgresql/8.4/bin -B /opt/nova/current/nova/parts/pg93/bin/
> -d /srv/postgresql/8.4/main/ -D /srv/postgresql/9.3/main --check
> Performing Consistency Checks
> -----------------------------
> Checking cluster versions ok
> Checking database user is a superuser ok
> Checking for prepared transactions ok
> Checking for reg* system OID user data types ok
> Checking for contrib/isn with bigint-passing mismatch ok
> Checking for large objects ok
> Checking for presence of required libraries ok
> Checking database user is a superuser ok
> Checking for prepared transactions ok
>
> *Clusters are compatible*

Uh, this connects to both old and new servers, so I am confused why it
later fails.

> postgres(at)SPV:/tmp$ cat pg_upgrade_utility.log
>
> -----------------------------------------------------------------
> pg_upgrade run on Thu Feb 13 23:13:54 2014
> -----------------------------------------------------------------
>
> command: "/opt/nova/current/nova/parts/pg93/bin/pg_dumpall" --port
> 50432 --username "postgres" --schema-only --globals-only
> --quote-all-identifiers --binary-upgrade -f
> pg_upgrade_dump_globals.sql >> "pg_upgrade_utility.log" 2>&1
> pg_dumpall: could not connect to database "template1": could not
> connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.50432"?

This is using /tmp because the old server is pre-9.1; it would normally
use the current directory for the socket file. Are you perhaps using a
non-standard setting? Our docs say:

If using a pre-9.1 old server that is using a non-default Unix-domain
socket directory or a default that differs from the default of the
new cluster, set <envar>PGHOST</> to point to the old server's socket
location. (This is not relevant on Windows.)

Does that help? Did you use a different environment for the check and
non-check phases?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message The Doctor 2014-02-14 03:16:19 Re: Using BSD/OS with 8.1, 8.4 and 9.3
Previous Message Bruce Momjian 2014-02-14 01:06:16 Re: Using BSD/OS with 8.1, 8.4 and 9.3