4

In the process of upgrading my PostgreSQL from version 9.2.4 to 9.3.1 (via homebrew on OS X) I came across an odd problem. These are the steps I took so far

  • PostgreSQL, PostGIS and required libraries installed (no errors)
  • run initdb on the new database
  • stopped both servers
  • running pg_upgrade

pg_upgrade performs the necessary checks, creates dumps of the old cluster, but when importing into the new cluster I get the following error:

> ./pg_upgrade -b /usr/local/Cellar/postgresql/9.2.4/bin/ -B /usr/local/Cellar/postgresql/9.3.1/bin -d /usr/local/var/postgres/ -D /usr/local/var/postgres9.3.1 -u postgres
Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
Checking database user is a superuser                       ok
Checking for prepared transactions                          ok
Checking for reg* system OID user data types                ok
Checking for contrib/isn with bigint-passing mismatch       ok
Creating dump of global objects                             ok
Creating dump of database schemas
                                                            ok
Checking for presence of required libraries                 fatal

Your installation references loadable libraries that are missing from the
new installation.  You can add these libraries to the new installation,
or remove the functions using them from the old installation.  A list of
problem libraries is in the file:
    loadable_libraries.txt

Failure, exiting

It appears as though PostgreSQL 9.3.1 tries to use PostGIS 2.0, which is not compatible

Could not load library "$libdir/postgis-2.0"
ERROR:  could not access file "$libdir/postgis-2.0": No such file or directory

Could not load library "$libdir/rtpostgis-2.0"
ERROR:  could not access file "$libdir/rtpostgis-2.0": No such file or directory

Has anyone run into the same problem?

1

Yes. See this PostGIS ticket: http://trac.osgeo.org/postgis/ticket/2489

In short, first upgrade to PostGIS 2.1.1, then you should be able to upgrade to PostgreSQL 9.3.1 without this error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.