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