greenplum 6.7.1 clu...
 
通知
清除全部

greenplum 6.7.1 cluster版本安装postgres_fdw失败


Jun
帖子: 4
 Jun
Topic starter
初出茅庐
已加入: 3年 前

greenplum 6.11版本安装postgres_fdw失败,报错信息如下:

[gpadmin@mdw postgres_fdw]$ make USE_PGXS=1
gcc -m64 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fno-aggressive-loop-optimizations -Wno-unused-but-set-variable -W
no-address -m64 -O3 -fargument-noalias-global -fno-omit-frame-pointer -g -std=gnu99 -Werror=uninitialized -Werror=implicit-function-declaration -fPIC -I/usr/local/greenplum-db-6.7.1/include -I. -I./ -I/usr/local/greenplum-db-6.7.1/in
clude/postgresql/server -I/usr/local/greenplum-db-6.7.1/include/postgresql/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/tmp/build/f8c7ee08/gpdb_src/gpAux/ext/rhel7_x86_64/include -c -o postgres_fdw.o postgres_fdw.c
postgres_fdw.c: In function ‘postgresGetForeignRelSize’:
postgres_fdw.c error: too few arguments to function ‘clauselist_selectivity
NULL);
^
In file included from postgres_fdw.c0:
/usr/local/greenplum-db-6.7.1/include/postgresql/server/optimizer/cost.h note: declared here
extern Selectivity clauselist_selectivity(PlannerInfo *root,
^
postgres_fdw.c: In function ‘postgresIterateForeignScan’:
postgres_fdw.c error: implicit declaration of function ‘ExecStoreTuple’ [-Werror=implicit-function-declaration]
ExecStoreTuple(fsstate->tuples[fsstate->next_tuple++],
^
postgres_fdw.c: In function ‘estimate_path_cost_size’:
postgres_fdw.c error: too few arguments to function ‘clauselist_selectivity
NULL);
^
In file included from postgres_fdw.c0:
/usr/local/greenplum-db-6.7.1/include/postgresql/server/optimizer/cost.h note: declared here
extern Selectivity clauselist_selectivity(PlannerInfo *root,
^
cc1: some warnings being treated as errors
make: *** [postgres_fdw.o] Error 1
7 回复
阿福
帖子: 49
Greenplum专家
青梅少侠
已加入: 4年 前

你好,你这是开源版本还是商业版本?create extension postgres_fdw;命令可用吗?麻烦贴一些详细点的信息出来吧。

回复
2 回复
Jun
 Jun
已加入: 3年 前

初出茅庐
帖子: 4

@chris 我们用的是开源版,试过

gpver_mes=# create extension postgres_fdw;
ERROR: could not open extension control file "/usr/local/greenplum-db-6.7.1/share/postgresql/extension/postgres_f
dw.control": No such file or directory
回复
Jun
 Jun
已加入: 3年 前

初出茅庐
帖子: 4

如果我先将postgres_fdw在postgres中编译好,然后再把对应的文件复制到lib和extension下时,create extension postgres_fdw又会提示如下:

复制如下3个文件至gp目录

/usr/local/greenplum-db/lib/postgresql/postgres_fdw.so'
/usr/local/greenplum-db-6.7.1/share/postgresql/extension/postgres_fdw.control
/usr/local/greenplum-db-6.7.1/share/postgresql/extension/postgres_fdw--1.0.sql

[gpadmin@mdw postgresql]$ ll /usr/local/greenplum-db-6.7.1/share/postgresql/extension/postgres_fdw.*
-rw-r--r--. 1 root root 172 Jun  3 20:27 /usr/local/greenplum-db-6.7.1/share/postgresql/extension/postgres_fdw.control

[gpadmin@mdw postgresql]$ ll /usr/local/greenplum-db-6.7.1/share/postgresql/extension/postgres_fdw*
-rw-r--r--. 1 root root 507 Jun  3 20:27 /usr/local/greenplum-db-6.7.1/share/postgresql/extension/postgres_fdw--1.0.sql
-rw-r--r--. 1 root root 172 Jun  3 20:27 /usr/local/greenplum-db-6.7.1/share/postgresql/extension/postgres_fdw.control

 

安装

gpadmin@mdw:5432/postgres# create extension postgres_fdw;
ERROR:  XX000: could not load library "/usr/local/greenplum-db-6.7.1/lib/postgresql/postgres_fdw.so": /usr/local/greenplum-db-6.7.1/lib/postgresql/postgres_fdw.so: undefined symbol: clamp_row_est (dfmgr.c:240)
LOCATION:  internal_load_library, dfmgr.c:240
Time: 449.314 ms
回复
Jun
帖子: 4
 Jun
Topic starter
初出茅庐
已加入: 3年 前

已经解决,下载对应版本的源码gpdb,重新编译contrib目录下的postgres-fdw安装

回复
1 回复
daixuej
已加入: 3年 前

初出茅庐
帖子: 2

大牛怎解决的 能否分享下啊

回复
781730117
帖子: 4
初出茅庐
已加入: 3年 前

请问对应的postgres-fdw版本在哪里下载,编译环境是啥样的

回复
1 回复
daixuej
已加入: 3年 前

初出茅庐
帖子: 2

同问

回复
Close Bitnami banner
Bitnami