Re: Upgrading using pg_dumpall

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Upgrading using pg_dumpall
Date: 2016-09-03 21:36:42
Message-ID: d7974768-5f0b-9bab-2d88-3e440edae306@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 09/03/2016 02:19 PM, Rich Shepard wrote:
> Postgres-9.3.4 was built directly from the web site download source. It's
> installed in /usr/lib/postgresql/9.3.4/. Postgresql-9.4.5 was built from
> the
> SlackBuilds.org script and installed in /usr/lib/postgresql/9.4/. The bin/
> subdirectory of the 9.4 version has all the excutable files, but that of
> the
> 9.3.4 version seens to contain only a few postgis files.
>
> When I run psql with a database name I see this:
> $ psql crm
> psql (9.4.5, server 9.3.4)
> Type "help" for help.
>
> crm=#
>
> so it appears to me that 9.4.5 is running while using the 9.3.4 data
> directory.

No it says you are using the 9.4.5 version of psql to connect to a 9.3.4
server. psql is available independent of the server running. You will
need to see if both servers are running by doing something like:

ps ax | grep postgres

>
> I want to move all data from 9.3.4 to 9.4.5. Data are in
> /var/lib/pgsql/9.3.4/data/ (405 M) and I want to move them to
> the empty (only 4.0 K) /var/lib/pgsql/9.4/data/.
>
> Reading the pg_upgrade man page tells me I need the old bin/ and data/
> directories as well as the new ones. I've no idea where the 9.3.4 bin
> directory now is; /usr/bin/postgres is a soft link to
> /usr/lib/postgresql/9.4/bin/postgres. This suggests that I need to use
> pg_dumpall, then read in the file using psql with the 9.4.5 version. I've
> dumped all databases to a .sql file and am unsure how to proceed.

Before you do any of that you need to verify that the servers you want
are running. Remember they can not share a port, so you need to look at
what the port settings are in the respective postgresql.conf files.

>
> Clue stick needed,
>
> Rich
>
>
>

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2016-09-03 21:44:46 Re: Upgrading using pg_dumpall
Previous Message Rich Shepard 2016-09-03 21:19:29 Upgrading using pg_dumpall