Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I just ran yum update on my Amazon Linux instance as part of an upgrade to 2012.09 and it upgraded PostgreSQL from 9.1 to 9.2. Now PostgreSQL won't start. What do I do?

(This is a very incomplete question because it's just here to provide somewhere to post the answer).

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Amazon's packages for PostgreSQL will upgrade from 9.1 to 9.2 as if that was a normal minor update. It isn't; see the PostgreSQL version policy, which makes it clear that the major version is "x.y", eg "9.1", "9.2", etc. This version policy may be weird and perhaps unwise, but it's also widely understood and something you would expect packagers to understand. The documentation for upgrading a PostgreSQL cluster explains this point very clearly.

The Amazon packages don't seem to get that, and just upgrade PostgreSQL. This is a very bad idea. Upgrades can involve downtime and backward-compatibility-breaking changes. C extension functions must be recompiled. A dump and reload may be required if pg_upgrade can't be used with your database. Even if pg_upgrade can be used, downtime can be significant.

See Amazon's severe PostgreSQL packaging blunder by Andrew Dunstan, and this bug report on the AWS forums.

Amazon has had a FAQ entry for this, but it's really the wrong answer. The right answer is "don't upgrade without asking!". Not only that, but doing a pg_upgrade can take some preparation and won't work for all databases. This is really bad advice. (They seem to have silently removed this FAQ entry now, that'll help those customers who're still updating from older versions!)

Nonetheless, pg_upgrade is your only easy option once this has happened. If you can't use it, you'll need to roll back to PostgreSQL 9.1, pg_dump your DBs and pg_dumpall --globals-only as well, then install 9.2 and load the dumps. See upgrading a PostgreSQL cluster

share|improve this answer
Andrew Dunstan's blog is returning blank pages for some reason, but it looks like that post was captured here:…. –  Mark Berry Jun 18 '14 at 18:07
Craig, can you confirm that Amazon has fixed this behavior? Looks to me like the PostgreSQL 9 packages in the amzn-main repo are now named with the first point, currently postgresql92 and postgresql93. I assume this means that yum update would take you from 9.2.7 to 9.2.9, for example, but not to 9.3.x. –  Mark Berry Feb 4 at 22:18
It looks like they have, but I haven't personally verified it since I don't use Amazon Linux given a choice. The problem could still exist if their RPMs declare Obsoletes: properties, even if the package names are different, though I doubt they would've done that if they've bothered to finally separate the packages. It's easy enough to test and see. –  Craig Ringer Feb 6 at 4:28
On a new machine built with a 2014.09 AMI, I had it install postgresql92 at 9.2.9. yum list updates does not show any updates available, even though yum list available postgresql* shows that postgresql93 packages are available. I may continue to use the exclusion in yum.conf so I can control the in-between patches as well. –  Mark Berry Feb 7 at 16:43

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.