I need a new PostgreSQL 9.1 machine. My go to distro is Debian (for no good reason other than it's what I first learned). However, when I started looking at documentation, it appears that Debian manages those packages from http://backports-master.debian.org/Instructions/. This is apparently a repo for unstable packages that haven't really been tested on Debian.

Here's the question: Is my assessment right? Is this what the backports repo is? If this isn't stable, why would I put it on a production box? Is there another distro with a package manager that I should be looking at instead?

  • Someone re-direct me to serverfault if this question is better suited for that forum. I'm a software guy, not a sys admin and I"m not sure which site would be more appropriate.
    – LJM
    May 3, 2012 at 18:05

4 Answers 4


The short version

You can safely install the PostgreSQL package from the backports. You'll probably get a stable piece of software that will not nuke your system.

The longer version

Debian comes in three flavours: stable, testing and unstable. See Debian Releases. You are apparently running Debian stable, which is the preferred release for a production environment.

Since you claim that you need PostgreSQL in version 9.1, you can check the package repository and you'll find out that the PostgreSQL version for the stable release is 8.4, for the testing and unstable release 9.1

What you can do is to change your Debian version from stable to testing. However, another option instead of updating the entire system to another version, is to use a back port. This is a single or a few (if it's more than a few you should consider upgrading to testing) packages from testing or unstable compiled for the stable release. The benefits are that you can stay on the Debian stable branch and use the more up-to-date software that you need (here: PostgreSQL). The software has not been extensively tested, otherwise it would be in stable already, but it's unlikely that this package will break your system. This is a more safe approach than to change to the testing or unstable branch.

  • Thank you for the explanation. I think I understand how this works a little better now. Is running the back port something that people do in production? Or am I better off finding another distro where PostgreSQL has seen more testing?
    – LJM
    May 3, 2012 at 19:17
  • @LJM If the production requires a version not available in stable, you either go for a backport (if available) or you build your own package. The fact that it comes from the testing or unstable branch does not imply that the software package is unstable; it rather means that the entire software tree might be unstable or not well tested, meaning the packages and all dependencies. When a piece of software shows unstable behaviour or didn't pass the module tests, then the software should not be released in the first place.
    – Marco
    May 3, 2012 at 19:30
  • @Marco You may want to look at wiki.postgresql.org/wiki/Apt as well, these are actually better maintained than the backports version... Jun 17, 2015 at 11:38

Your reason for Debian is a good one. But in the future your should stay on that choice.

Another idea might be using RedHat, CentOS or Scientific Linux.

I found a quite stable looking repository for EL5.


PostgreSQL maintains its own APT repository with ports for Squeeze (6.x), Wheezy (7.x), Jessie (8.x, current stable) and sid (unstable) as well as various Ubuntu variants

Instructions on what to add to /etc/apt/sources.list.d/20-pgsql.list can be found here

NOTE: That page covers both adding the repository to your sources list and adding the pgdg GPG key to your keyring of trusted package signers. If you don't do the latter apt-get will refuse to use the sources because of untrusted keys.

From personal experience, this is your best bet if you need a version of postgreSQL that isn't in your current distribution yet.


I looked at the distribution of Postgresql 9.1.3 and you could also easily build from source. It's possible that you have to install a few -devl packages but it should be easy.

I would personally recommend building from source, if it is important. Otherwise the above answers are excellent for Debian.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .