gpt4 book ai didi

postgresql - 如何使用 PostGIS 升级 PostgreSQL?

转载 作者:行者123 更新时间:2023-11-29 11:25:13 25 4
gpt4 key购买 nike

我正在运行 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com