How to upgrade PostgreSQL with PostGIS?

心已入冬 提交于 2019-12-07 04:01:00

问题


I was running PostgreSQL 9.1 and I am trying to upgrade to PostgreSQL 9.3:

$ /usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.3/main/ -O "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"

However it fails with:

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

loadable_libraries.txt contains:

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

It is similar to Missing libraries when upgrading to PostGIS 2.1 and PostgreSQL 9.3.1 using homebrew.

I am running Ubuntu and I have install PostgreSQL with PostGIS using apt-get.

Anyone managed that?


回答1:


Since PostGIS 1.5 is not supported with PostgreSQL 9.3, you are also upgrading PostGIS versions. Since pg_upgrade cannot be used for this, you will need to follow the hard upgrade procedure, which utilises logic in a postgis_restore.pl script that comes with PostGIS. If you have any further questions with the procedure, amend them to this question.



来源:https://stackoverflow.com/questions/22887881/how-to-upgrade-postgresql-with-postgis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!