Friday, October 9, 2009

Installing PostgreSQL 8.4 on Ubuntu Jaunty (9.04)

Inaugural post!

Ubuntu 9.04 (Jaunty Jackalope) includes PostgreSQL 8.3 via the expected apt-get install postgresql. This is great, but PostgreSQL 8.4.1 has a number of nice features that I want (WITH queries, for example). At first I was just going to wait for Ubuntu 9.10, which is coming very shortly, but I am impatient. It turns out there is a pretty easy "Ubuntu way" to get PostgreSQL 8.4 installed on 9.04 without a lot of headaches (like building from source). The solution is using Ubuntu PPAs.

Add the custom PPA for PostgreSQL to /etc/apt/sources.list:

deb jaunty main
deb-src jaunty main

Get the key for these new sources:

sudo apt-key adv --keyserver --recv-keys 8683D8A2

Update the package list:

sudo apt-get update


sudo apt-get install postgresql-8.4

PostgreSQL 8.4.1 will now be running, but on port 5433, not the standard 5432. I assume this was done so you can run 8.3 and 8.4 at the same time on Ubuntu 9.04. I only want 8.4.1, so I changed the port and restarted:

sudo sed -i.bak -e 's/port = 5433/port = 5432/' \

sudo /etc/init.d/postgresql-8.4 stop
sudo /etc/init.d/postgresql-8.4 start

These PPAs for PostgreSQL only exist because of Martin Pitt, who appears to be responsible for PostgreSQL on Ubuntu, so many thanks to him!


  1. Could you please, upload to launchpad postgresql 8.4.2 for ubuntu 9.04?

  2. launchpad repository is broken; is there any easy way to contact Martin?

  3. @نلسون: Sorry, I don't actually know Martin Pitt, I just linked to him.

    @Sam: no prob!

    @Никита Кокшаров: I'm just a user, not the provider of the package, so you'll have to ask elsewhere if you need 8.4.2.

  4. Try the backports, it has 8.4 now

    deb jaunty-backports main universe multiverse restricted

  5. I install postgresql in ubuntu 10.10,but in pgadmin there is no any recognised may ai help please..!