PG伪类型anyelement触发pg_pathman的一个bug

在使用PG 9.5.5和pg_pathman 1.3时,用户遇到因anyelement伪类型导致的错误:"ERROR: could not determine which collation to use for string comparison"。解决方法包括停库、修改配置文件、删除并重新安装pg_pathman插件,以及修正表定义,将statstime字段改为date类型。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值