1

I've just finished an upgrade on an Ubuntu box with a dockerized Postgres container. The upgrade appears to have gone off great. But when log in to the docker container/server I get a warning message:

psql (9.3.10, server 9.5.2) WARNING: psql major version 9.3, server major version 9.5. Some psql features might not work.

How I did the upgrade was to spin up a new docker container with 9.5.2. Once the container was up I piped a pg_dumpall from the old server to the new server using pg_dumpall -h localhost -U postgres -p 5432 | psql -h localhost -U postgres -p 5532. After the dump was complete I swapped the data dir: mv /data/postgres/data data.old mv /data/postgres/data9.5.2 data. These are the mapped volumes from the docker container. Then I stopped and removed the 9.3 container and started up the new 9.5 one with the right ports and docker name mapped. I was able to start the server and log in and everything appears to be working but the warning is giving me cause for concern.

Any ideas what I could do differently and how to resolve this warning? I have several other databases that I'll need to do this on.

  • It uses new data and server but runs old binary. – Mladen Uzelac Apr 12 '16 at 0:23
  • @MladenUzelac is there a solution? The documentation suggests a pg_dump to do major upgrades. pg_upgrade seems to upgrade the old binaries but there is nothing that I'm finding for upgrading them with just a pg_dump and restore. – Pistol Pete Apr 12 '16 at 4:04
  • The point is the path of psql binary. Is it run from the container or from your system? – Mladen Uzelac Apr 12 '16 at 15:46
  • It's ran from the system. When I set up the container I map the volume -v /data/postgres/mycontainer:/var/lib/postgresql/data . So all data binaries and confs are run from the system volume. – Pistol Pete Apr 13 '16 at 15:07
  • Are you running psql binary from your system or from container. It seems that binary on your system is from 9.3 that tries to connect to the container which is 9.5.2 and then you are getting notification. – Mladen Uzelac Apr 13 '16 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.