PG版本 9.5.5
pg_pathman 版本 1.3
问题:
今天用户上报一个问题,在跑建表脚本之后数据库连接被驳回,然后不清楚表是否创建成功。
再连到数据库做任何操作都会报如下错误:
ERROR: could not determine which collation to use for string comparison
HINT: Use the COLLATE clause to set the collation explicitly.
用户的表定义如下:
-- Table: public.a_pathman_range_par_test
-- DROP TABLE public.a_pathman_range_par_test;
CREATE TABLE public.a_pathman_range_par_test
(
statstime text NOT NULL,
iter integer
)
WITH (
OIDS=FALSE
);
select
create_range_partitions(
'a_pathman_range_par_test'::regclass
,'statstime'::text
,'201706'::anyelement
,'1'::integer
,3
,false --是否迁移数据)
经专家各方分析,认定是伪类型anyelement触发pg_pathman的一个bug。
解决方法:
停库pg stop
修改配置文件
vi postgresql.conf 先去掉pg_pathman:
shared_preload_libraries = 'repmgr_funcs,pg_stat_s