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. 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

Our production server is running PostgreSQL v8.2.3 on CentOS5.2. We're planning to upgrade to the latest version in 8.2 series, that is v8.2.20. Also, in future, we've planned to upgrade to the most recent minor release as soon as possible (as and when released by PostgreSQL).

Initially, we've installed v8.2.3 from source. PostgreSQL is installed in /usr/local/pgsql/ and data directory is available in /usr/local/pgsql/data

PostgreSQL Versioning policy says:

Upgrading to a minor release does not require a dump and restore; merely stop the database server, install the updated binaries, and restart the server.

Now, without a dump/restore, what are the recommended ways/steps involved in upgrading PostgreSQL to latest version for minor releases?

EDIT: Well, I should have asked my question this way. Since the doc says install the updated binaries, my question is whether the latest version can be installed as-is. Will my data directory /usr/local/pgsql/data/ be disturbed in any way? Or should this data directory be moved temporarily until the latest installation is completed. In addition, iss there anything, as an admin, I need to take care, like, taking a backup of /usr/local/pgsql/data/postgresql.conf, etc.?

share|improve this question
Which part of "stop the database server, install the updated binaries, and restart the server" are you having problems with? – Peter Eisentraut Mar 1 '11 at 9:34
of course as an admin I always recommend doing a backup before doing an upgrade. but @peter is otherwise correct in asking what part of that are you having a problem with. – xenoterracide Mar 1 '11 at 9:36
@Peter & @xenoterracide: Since this is our production server, I just wanted to understand this clearly - installing the updated binaries. Though the documentation may say install the updated binaries, I thought (my understanding of) upgrade is something to be carried out differently. We've our data directory in /usr/local/pgsql/data/. When I upgrade (install) as-is, my data directory will not be disturbed right? – Gnanam Mar 1 '11 at 10:28
Create a (virtual) test server and test the update procedure. When everything is fine, you do the same trick on your production machine. And yes, you do make a backup before the update. Just to be safe. – Frank Heikens Mar 1 '11 at 14:55
@Peter: Based on my EDIT section in the question, do you still consider it should be down voted? – Gnanam Mar 2 '11 at 6:45
up vote 6 down vote accepted

If you are doing a minor version upgrade, nothing will or should touch your data directory. If you are using binary packages, just run whatever upgrade procedure they provide (apt/yum upgrade, etc.). If building from source, just do make install over the old files and then restart the server (pg_ctl restart or whatever you're using).

The documentation could perhaps be amended to say that you could even install the new binaries before restarting the server.

share|improve this answer
Thanks for the clarification. Do reconsider on down vote of my question. This down vote makes me think that I've asked something deliberately wrong which is not supposed to ask. Which in my way correct in what I'm trying to ask here. – Gnanam Mar 2 '11 at 10:38
I didn't downvote anything. – Peter Eisentraut Mar 2 '11 at 20:49
Though I posted this question some time back, we upgraded to the latest 8.2 series, that is v8.2.22, only recently. As suggested here, I just did ./configure, gmake, gmake install over the old files, and it was upgraded successfully! – Gnanam Oct 12 '11 at 12:11

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.