From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Robert Haas <robertmhaas@gmail.com>
To: James Coleman <jtc331@gmail.com>
Cc: Luc Vlaming <luc@swarm64.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: "could not find pathkey item to sort" for TPC-DS queries 94-96
Date: Thu, 15 Apr 2021 22:18:34 +0200
Message-ID: <d0097e39-b4fb-effd-5701-dcbe4f2353df@enterprisedb.com> (raw)
In-Reply-To: <CA+TgmoZ5OY_J_eHSv9cf9u0FHEPU2Pck+5RLtLfORn0Z8B=e_Q@mail.gmail.com>
References: <91f3ec99-85a4-fa55-ea74-33f85a5c651f@swarm64.com>
<b386c655-ba5d-a1e2-9791-83b103f5a638@enterprisedb.com>
<CA+TgmoY-OD-qmU-gwLxwH+nv_9WK60UkTUk=oCcHVh1RECfDFg@mail.gmail.com>
<CAAaqYe9O2QSykTQgcx7Nu5pb_DC5Y+oE7-8EXeURNNk3SBc42A@mail.gmail.com>
<CA+TgmoZ5OY_J_eHSv9cf9u0FHEPU2Pck+5RLtLfORn0Z8B=e_Q@mail.gmail.com>
On 4/15/21 2:21 AM, Robert Haas wrote:
> On Wed, Apr 14, 2021 at 8:20 PM James Coleman <jtc331@gmail.com> wrote:
>>> Hmm, could be. Although, the stack trace at issue doesn't seem to show
>>> a call to create_incrementalsort_plan().
>>
>> The changes to gather merge path generation made it possible to use
>> those paths in more cases for both incremental sort and regular sort,
>> so by "incremental sort" I read Tomas as saying "the patches that
>> brought in incremental sort" not specifically "incremental sort
>> itself".
>
> I agree. That's why I said "hmm, could be" even though the plan
> doesn't involve one.
>
Yeah, that's what I meant. The difference to pre-13 behavior is that we
now call generate_useful_gather_paths, which also considers adding extra
sort (unlike plain generate_gather_paths).
So now we can end up with "Gather Merge -> Sort" paths that would not be
considered before.
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
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, robertmhaas@gmail.com, jtc331@gmail.com, luc@swarm64.com
Subject: Re: "could not find pathkey item to sort" for TPC-DS queries 94-96
In-Reply-To: <d0097e39-b4fb-effd-5701-dcbe4f2353df@enterprisedb.com>
References: <91f3ec99-85a4-fa55-ea74-33f85a5c651f@swarm64.com> <b386c655-ba5d-a1e2-9791-83b103f5a638@enterprisedb.com> <CA+TgmoY-OD-qmU-gwLxwH+nv_9WK60UkTUk=oCcHVh1RECfDFg@mail.gmail.com> <CAAaqYe9O2QSykTQgcx7Nu5pb_DC5Y+oE7-8EXeURNNk3SBc42A@mail.gmail.com> <CA+TgmoZ5OY_J_eHSv9cf9u0FHEPU2Pck+5RLtLfORn0Z8B=e_Q@mail.gmail.com> <d0097e39-b4fb-effd-5701-dcbe4f2353df@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