我正在尝试将 PostgreSQL 数据库从 11.2 升级到 12.2,它上面有 cstore_fdw 扩展。据我所知,这是不支持的,所以我将所有 cstore 外部表迁移到本机表,删除了扩展:
create schema cstore_backup;
-- executed the results of all of these:
select
format ('create table cstore_backup.%s_%s as select * from %s.%s;',
foreign_table_schema, foreign_table_name,
foreign_table_schema, foreign_table_name)
from information_schema.foreign_tables ft
where foreign_server_name = 'cstore_server';
select
format ('drop foreign table %s.%s;',
foreign_table_schema, foreign_table_name)
from information_schema.foreign_tables ft
where foreign_server_name = 'cstore_server';
DROP SERVER cstore_server;
drop extension cstore_fdw;
我删除了文件夹(迁移后我会将它们放回 cstore):
rm -fr /apps/pgdata11.2.0/cstore_fdw
rm -f /usr/local/psql11.2/share/postgresql/extension/cst*
我从 postgresql.conf 文件中删除了引用。
当我运行 pg_upgrade 时:
$BIN/pg_upgrade \
--old-bindir=/usr/local/psql11.2/bin \
--new-bindir=/usr/local/psql12.2/bin \
--old-datadir=/apps/pgdata11.2.0 \
--new-datadir=/apps/pgdata12.2.0 \
--old-port=5432 \
--new-port=5432 \
--jobs=4 --link --username=postgres --check
我仍然在 loadable_libraries.txt 输出文件中收到此消息:
无法加载库“/usr/local/psql11.2/lib/postgresql/cstore_fdw.so”:错误:无法加载库“/usr/local/psql11.2/lib/postgresql/cstore_fdw.so”:/usr /local/psql11.2/lib/postgresql/cstore_fdw.so:未定义符号:ExecClearTuple
我难住了。cstore_fdw 仍然驻留在我的安装中的什么位置?