pgpool – 夏清然的日志 https://www.qingran.net Xia Qingran Geek Blog Sun, 07 Aug 2016 09:50:33 +0000 en-US hourly 1 https://wordpress.org/?v=4.6.1 112893047 解决pgpool2.2.2在PostgreSQL8.4.0下无法使用问题 https://www.qingran.net/2009/08/%e8%a7%a3%e5%86%b3pgpool2-2-2%e5%9c%a8postgresql8-4-0%e4%b8%8b%e6%97%a0%e6%b3%95%e4%bd%bf%e7%94%a8%e9%97%ae%e9%a2%98/ https://www.qingran.net/2009/08/%e8%a7%a3%e5%86%b3pgpool2-2-2%e5%9c%a8postgresql8-4-0%e4%b8%8b%e6%97%a0%e6%b3%95%e4%bd%bf%e7%94%a8%e9%97%ae%e9%a2%98/#respond Sat, 08 Aug 2009 10:18:08 +0000 https://www.qingran.net/?p=1102 PostgreSQL从8.3.x升级到8.4.0后,pgpool-II的最新版2.2.2无法编译通过,报以下错误:


sed 's,MODULE_PATHNAME,$libdir/pgpool-recovery,g' pgpool-recovery.sql.in >pgpool-recovery.sql
cc -O2 -fno-strict-aliasing -pipe -O3 -funroll-loops -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fPIC -DPIC -I. -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql/internal -I/usr/local/include -c -o pgpool-recovery.o pgpool-recovery.c
pgpool-recovery.c: In function `pgpool_recovery':
pgpool-recovery.c:47: error: `textout' undeclared (first use in this function)
pgpool-recovery.c:47: error: (Each undeclared identifier is reported only once
pgpool-recovery.c:47: error: for each function it appears in.)
pgpool-recovery.c: In function `pgpool_remote_start':
pgpool-recovery.c:79: error: `textout' undeclared (first use in this function)
gmake: *** [pgpool-recovery.o] Error 1
*** Error code 2

经过查找,应该是PostgreSQL 8.4.0的include头文件有了一些改动造成。
解决方法:
在pgpool-II 2.2.2的源代码文件 sql/pgpool-recovery/pgpool-recovery.c 第40行加入:

extern Datum textout (PG_FUNCTION_ARGS);

即可!

]]>
https://www.qingran.net/2009/08/%e8%a7%a3%e5%86%b3pgpool2-2-2%e5%9c%a8postgresql8-4-0%e4%b8%8b%e6%97%a0%e6%b3%95%e4%bd%bf%e7%94%a8%e9%97%ae%e9%a2%98/feed/ 0 1102