You are not logged in.

#1 2016-03-25 15:18:48

yha
Member
Registered: 2016-03-25
Posts: 2

Upgrading postgresql from 9.4 to 9.5

Hi,

A recent 'pacman -Syu' seems to have upgraded postgresql to 9.5 (from 9.4, I believe). Trying to bring up my Pg server up now using systemctl fails. So I'm trying to follow the instructions on the wiki regarding upgrading postgresql, but I'm stuck on the last step: running the pg_upgrade command. I need to pass at least 4 arguments: -b, -B, -d, and -D. -d and -D are all OK, but all my Pg binaries are in one place: /usr/bin. How can I migrate my 9.4 data to 9.5?

[postgres@arch ~]$ pg_upgrade -b /usr/bin -B /usr/bin/ -d /var/lib/postgres/data-9.4/ -D /var/lib/postgres/data
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   
Old cluster data and binary directories are from different major versions.
Failure, exiting
[postgres@arch ~]$ 

Offline

#2 2016-03-25 16:58:50

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: Upgrading postgresql from 9.4 to 9.5

Why are they in /bin rather than /opt?  Have you changed something?


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2016-04-28 03:25:01

jehiva
Member
Registered: 2011-06-24
Posts: 17

Re: Upgrading postgresql from 9.4 to 9.5

I too have this issue.  None of the postgres binaries have ever been installed in /opt by pacman, and since the pg_upgrade program expects the old binary to be present, this definitely creates an issue.

Offline

#4 2016-04-28 04:12:33

jehiva
Member
Registered: 2011-06-24
Posts: 17

Re: Upgrading postgresql from 9.4 to 9.5

Well, I went ahead and created an AUR package for postgresql-9.4, so if someone else runs into this, at the least you can pg_dump your 9.4 data and import it on 9.5:

https://aur.archlinux.org/packages/postgresql-9.4/

Offline

#5 2016-11-15 13:16:09

w-flo
Member
Registered: 2014-07-12
Posts: 8

Re: Upgrading postgresql from 9.4 to 9.5

You want the "postgresql-old-upgrade" package, which installs the old postgres binaries into /opt. It's on 9.5 now though, since 9.6 is the latest release.

Offline

Board footer

Powered by FluxBB