Re: "could not find pathkey item to sort" for TPC-DS queries 94-96
Tomas Vondra <tomas.vondra@enterprisedb.com>
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Luc Vlaming <luc@swarm64.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2021-04-12T12:36:58Z
Lists: pgsql-hackers
On 4/12/21 2:24 PM, Luc Vlaming wrote: > Hi, > > When trying to run on master (but afaik also PG-13) TPC-DS queries 94, > 95 and 96 on a SF10 I get the error "could not find pathkey item to sort". > When I disable enable_gathermerge the problem goes away and then the > plan for query 94 looks like below. I tried figuring out what the > problem is but to be honest I would need some pointers as the code that > tries to matching equivalence members in prepare_sort_from_pathkeys is > something i'm really not familiar with. > Could be related to incremental sort, which allowed some gather merge paths that were impossible before. We had a couple issues related to that fixed in November, IIRC. > To reproduce you can either ingest and test using the toolkit I used too > (see https://github.com/swarm64/s64da-benchmark-toolkit/), or > alternatively just use the schema (see > https://github.com/swarm64/s64da-benchmark-toolkit/tree/master/benchmarks/tpcds/schemas/psql_native) > Thanks, I'll see if I can reproduce that with your schema. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Rename find_em_expr_usable_for_sorting_rel.
- 7645376774c8 14.0 landed
-
Fix planner failure in some cases of sorting by an aggregate.
- 7bfba4f19330 13.3 landed
- 375398244168 14.0 landed