Search Postgresql Archives

Re: Upgrading using pg_dumpall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.klaver@xxxxxxxxxxx


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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux