- publishing free software manuals
The PostgreSQL 9.0 Reference Manual - Volume 3 - Server Administration Guide
by The PostgreSQL Global Development Group
Paperback (6"x9"), 274 pages
ISBN 9781906966072
RRP £9.95 ($14.95)

Sales of this book support the PostgreSQL project! Get a printed copy>>>

10.4 Migration Between Releases

This section discusses how to migrate your database data from one PostgreSQL release to a newer one. The software installation procedure per se is not the subject of this section; those details are in section 1 Installation from Source Code.

PostgreSQL major versions are represented by the first two digit groups of the version number, e.g., 8.4. PostgreSQL minor versions are represented by the third group of version digits, e.g., 8.4.2 is the second minor release of 8.4. Minor releases never change the internal storage format and are always compatible with earlier and later minor releases of the same major version number, e.g., 8.4.2 is compatible with 8.4, 8.4.1 and 8.4.6. To update between compatible versions, you simply replace the executables while the server is down and restart the server. The data directory remains unchanged--minor upgrades are that simple.

For major releases of PostgreSQL, the internal data storage format is subject to change, thus complicating upgrades. The traditional method for moving data to a new major version is to dump and reload the database. Other, less-well-tested possibilities are available, as discussed below.

New major versions also typically introduce some user-visible incompatibilities, so application programming changes may be required. Cautious users will want to test their client applications on the new version before switching over fully; therefore, it's often a good idea to set up concurrent installations of old and new versions. When testing a PostgreSQL major upgrade, consider the following categories of possible changes:

Administration
The capabilities available for administrators to monitor and control the server often change and improve in each major release.
SQL
Typically this includes new SQL command capabilities and not changes in behavior, unless specifically mentioned in the release notes.
Library API
Typically libraries like libpq only add new functionality, again unless mentioned in the release notes.
System Catalogs
System catalog changes usually only affect database management tools.
Server C-language API
This involves changes in the backend function API, which is written in the C programming language. Such changes affect code that references backend functions deep inside the server.
ISBN 9781906966072The PostgreSQL 9.0 Reference Manual - Volume 3 - Server Administration GuideSee the print edition