我正在运行 PostgreSQL 9.1,我正在尝试升级到 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"
但是它失败了:
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
包含:
Could not load library "$libdir/postgis-1.5" ERROR: could not access file "$libdir/postgis-1.5": No such file or directory
类似于Missing libraries when upgrading to PostGIS 2.1 and PostgreSQL 9.3.1 using homebrew .
我正在运行 Ubuntu,我已经使用 apt-get
安装了 PostgreSQL 和 PostGIS。
有人成功过吗?
最佳答案
自 PostGIS 1.5 is not supported with PostgreSQL 9.3 ,您还升级了 PostGIS 版本。由于 pg_upgrade
不能用于此,您需要遵循 hard upgrade procedure ,它利用了 PostGIS 附带的 postgis_restore.pl
脚本中的逻辑。如果您对该程序有任何其他疑问,请将其修改为该问题。
关于postgresql - 如何使用 PostGIS 升级 PostgreSQL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22887881/