Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was running postgres 8.4 on arch but now have 9 installed I want to use pg_upgrade to upgrade but I don't know what all the options I have to use are, and all the directories that I have to point it to. it asks for a previous pg binary directory... but that's gone. Will it still work? note: I've no important data, just play db's I just want to know how to do it.

share|improve this question
You said the previous binaries are gone. So, you should be doing a new install? – Khaled Nov 27 '10 at 15:35
@khaled no I just upgraded the install with pacman the database is still there, just not the previous 8.4 binaries. do both (8.4 and 9.0) have to be installed side by side for it to work? – xenoterracide Nov 27 '10 at 17:26
up vote 2 down vote accepted

I'm sure you've read the documentation but just in case you haven't - "F.32. pg_upgrade".

The step-by-step instructions are especially detailed.

As a minumum you need to provide values for --old-datadir, --new-datadir, --old-bindir and --new-bindir options.

If your old installation is missing you could always (I hope so, I've never used Arch Linux) re-install it without overwriting the old data directory. If your distribution doesn't facilitate that you could re-install (temporarily) the old version from source.

Then you could run pg_upgrade. Remember to configure the two co-existing installations (the new one and the old one) to use different ports. And also set (temporarily) the local access method for both to "trust".

share|improve this answer
arch now has the package extra/postgresql-old-upgrade to allow concurrent installs – xenoterracide Oct 15 '13 at 19:37

That's one of the problems with using Postgres on Arch: upon upgrade it won't change the file format automatically.

I usually just do database dump and restore as upgrade procedure. (you should have database dumps anyway as a backup...)

share|improve this answer
well until recently it wasn't possible... – xenoterracide Nov 28 '10 at 0:20
wait does it do it automatically in another distro? – xenoterracide Nov 29 '10 at 22:10
I don't have any experience on this but I'd guess that the likes of Ubuntu, Fedora or Debian do this automatically. Arch is a bare-bone distro following KISS principles on from the programmers point of view... – Hubert Kario Nov 30 '10 at 19:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.