开发者社区> 问答> 正文

pg_pathman与pipelinedb插件冲突

一、环境

root用户yum方式安装如下软件包 postgresql版本: postgresql10-10.7 pipelinedb版本:pipelinedb-postgresql-10-1.0.0-12 pg_pathman版本:pg_pathman-1.5

postgresql安装方法: yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm -y yum install postgresql10-contrib postgresql10-server postgresql10-devel -y

pipelinedb安装方法: curl -s http://download.pipelinedb.com/yum.sh | sudo bash yum install pipelinedb-postgresql-10

pg_pathman安装方法: yum install -y pg_pathman10

二、问题现象

1、在postgresql.conf中添加

shared_preload_libraries = 'pg_stat_statements,pg_pathman,pipelinedb'

2、CREATE两个插件:

postgres=# CREATE EXTENSION pg_pathman; postgres=# CREATE EXTENSION pipelinedb; postgres=# \dx List of installed extensions Name | Version | Schema | Description ------------+---------+------------+---------------------------------- pg_pathman | 1.5 | public | Partitioning tool for PostgreSQL pipelinedb | 1.0.0 | public | PipelineDB plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language

3、创建流stream

postgres=# CREATE FOREIGN TABLE stream_test (x integer, y integer, z text) SERVER pipelinedb; CREATE FOREIGN TABLE

4、当使用piepelinedb VIEW时会出现以下问题:

postgres=# CREATE VIEW test1 AS select sum(x + y) from stream_test; server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Succeeded.

四、postgresql日志

PostgreSQL version: 10.5 PipelineDB version: 1.0.0 at revision 60bcaae528e0f703aadf38da44c3c1935bca58b6 query: CREATE VIEW test1 AS select sum(x + y) from stream_test; backtrace: /usr/pgsql-10/lib/pipelinedb.so(debug_segfault+0x2b)[0x7f9eea97974b] /lib64/libpthread.so.0(+0xf5d0)[0x7f9ef983b5d0] /usr/pgsql-10/lib/pipelinedb.so(+0x4af5d)[0x7f9eea93af5d] postgres: postgres postgres [local] CREATE VIEW[0x679096] postgres: postgres postgres [local] CREATE VIEW[0x67689f] postgres: postgres postgres [local] CREATE VIEW[0x676c8b] postgres: postgres postgres [local] CREATE VIEW(create_plan+0x29)[0x678e49] postgres: postgres postgres [local] CREATE VIEW(standard_planner+0x14e)[0x68341e] /usr/pgsql-10/lib/pipelinedb.so(PipelinePlanner+0x185)[0x7f9eea9447d5] /usr/pgsql-10/lib/pg_pathman.so(pathman_planner_hook+0xb4)[0x7f9eea6db5f4] postgres: postgres postgres [local] CREATE VIEW(pg_plan_query+0x1e)[0x71a5ee] /usr/pgsql-10/lib/pipelinedb.so(+0x54e31)[0x7f9eea944e31] /usr/pgsql-10/lib/pipelinedb.so(GetContPlan+0x6c)[0x7f9eea94522c] /usr/pgsql-10/lib/pipelinedb.so(ExecCreateContViewStmt+0x1245)[0x7f9eea96c745] /usr/pgsql-10/lib/pipelinedb.so(PipelineProcessUtility+0xabd)[0x7f9eea94f91d] /usr/pgsql-10/lib/pg_pathman.so(pathman_process_utility_hook+0x74)[0x7f9eea6db814] postgres: postgres postgres [local] CREATE VIEW[0x71d368] postgres: postgres postgres [local] CREATE VIEW[0x71dda7] postgres: postgres postgres [local] CREATE VIEW(PortalRun+0x185)[0x71e995] postgres: postgres postgres [local] CREATE VIEW[0x71aa13] postgres: postgres postgres [local] CREATE VIEW(PostgresMain+0xf7c)[0x71bd0c] postgres: postgres postgres [local] CREATE VIEW[0x47b246] postgres: postgres postgres [local] CREATE VIEW(PostmasterMain+0xecf)[0x6b25ef] postgres: postgres postgres [local] CREATE VIEW(main+0x7bf)[0x47c06f] /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f9ef72dc3d5] postgres: postgres postgres [local] CREATE VIEW[0x47c0d6]

五、提问?

1、插件冲突原因是否因pgpathman占用ProcessUtilityhook导致pipelinedb使用不了?

2、若不是是否有方法可避免?

展开
收起
kun坤 2019-11-28 13:38:39 734 0
1 条回答
写回答
取消 提交回答
  • 1.第一个问题是:不会,从pgpathman的代码实现上看,pgpathman的ProcessUtilityhook内部逻辑中会调用其他插件的ProcessUtility钩子函数. 2.对于第二个问题,您可以提供一下重现的步骤,让社区专家确定一下问题原因。谢谢!

    基于<2、问题现象>,在CREATE VIEW之前,事先创建好一个stream:

    CREATE FOREIGN TABLE stream_test (x integer, y integer, z text) SERVER pipelinedb;

    之后不管是CREATE VIEW或SELECT VIEW都会抛出<2、问题现象>的问题

    2019-11-28 13:39:02
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_余鹏_gogudb—基于FDW实现的PG分库分表插件 立即下载
阿里云PostgreSQL、PPAS、HDB for PG生 立即下载
PostgresChina2018_赖思超_PostgreSQL10_hash索引的WAL日志修改版final 立即下载