pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Luc Vlaming <luc@swarm64.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: "could not find pathkey item to sort" for TPC-DS queries 94-96
Date: Mon, 12 Apr 2021 14:36:58 +0200
Message-ID: <b386c655-ba5d-a1e2-9791-83b103f5a638@enterprisedb.com> (raw)
In-Reply-To: <91f3ec99-85a4-fa55-ea74-33f85a5c651f@swarm64.com>
References: <91f3ec99-85a4-fa55-ea74-33f85a5c651f@swarm64.com>

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





view thread (29+ messages)  latest in thread

Message-ID: <b386c655-ba5d-a1e2-9791-83b103f5a638@enterprisedb.com>
Permalink:  ../b386c655-ba5d-a1e2-9791-83b103f5a638@enterprisedb.com/
Also on:    postgresql.org/message-id/b386c655-ba5d-a1e2-9791-83b103f5a638@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tomas.vondra@enterprisedb.com, luc@swarm64.com
  Subject: Re: "could not find pathkey item to sort" for TPC-DS queries 94-96
  In-Reply-To: <b386c655-ba5d-a1e2-9791-83b103f5a638@enterprisedb.com>
  References: <91f3ec99-85a4-fa55-ea74-33f85a5c651f@swarm64.com> <b386c655-ba5d-a1e2-9791-83b103f5a638@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox