Skip to content

ERROR: could not find pathkey item to sort #237

Open
@longtian001

Description

@longtian001

Problem description

1.parent table(90 columns)

create table test_t1(
id_hbs_sale_order varchar(36) not null default uuid_generate_v4(),
......
pcode varchar(40),
ccode varchar(3),
status varchar(10),
created_by varchar(150) not null default 'system',
created_date timestamp(0) with time zone not null default now(),
updated_by varchar(150) not null default 'system',
updated_date timestamp(0) with time zone default now()
);
2. create range partition tables every 7 days
select create_range_partitions(
'test_t1'::regclass,
'created_date',
'2020-07-01 00:00:00'::timestamp(0) with time zone,
interval '7 days',
72,
false
);

insert some data

  1. execute prepare sql
    prepare test_prepare(
    timestamp,
    timestamp,
    varchar(40),
    varchar(40),
    varchar(3),
    varchar(3),
    varchar(10))
    as
    select *
    from test_t1
    where
    created_date between $1 and $2
    and pcode in ($3,$4)
    and ccode in ($5,$6)
    and status !=$7
    order by updated_date desc
    limit 20 offset 0;

execute test_prepare(
'2020-07-08 00:00:00','2020-07-17 00:00:00',
'102345','10023','3','m','13'
);

error info
ERROR: could not find pathkey item to sort

Environment

OS: RHEL 7.4 X86 64
DB: postgresql 10.11 source install
plugin: pg_pathman 1.4.12 (try to update 1.5.11, but the problem still exists)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions