public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Rowley <[email protected]>
To: Richard Guo <[email protected]>
Cc: James Coleman <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: Robert Haas <[email protected]>
Subject: Re: set_cheapest without checking pathlist
Date: Thu, 1 Feb 2024 16:37:29 +1300
Message-ID: <CAApHDvrF2LStybjHzxjPHbEAphgqRGcPiBOq1wLvC_5POUNysg@mail.gmail.com> (raw)
In-Reply-To: <CAMbWs4-=eCZMxw6Th4e86qmSVj+3z+3O7iuAyORBJN3qt-GhMA@mail.gmail.com>
References: <CAAaqYe-jemDqoAr0CtHjXFGw3uq+v7=F2HcGeHhO58_u0xjoqA@mail.gmail.com>
	<CAMbWs4-=eCZMxw6Th4e86qmSVj+3z+3O7iuAyORBJN3qt-GhMA@mail.gmail.com>

On Thu, 1 Feb 2024 at 16:29, Richard Guo <[email protected]> wrote:
>
>
> On Thu, Feb 1, 2024 at 10:04 AM James Coleman <[email protected]> wrote:
>>
>> I don't see any inherent reason why we must always assume that
>> gather_grouping_paths will always result in having at least one entry
>> in pathlist. If, for example, we've disabled incremental sort and the
>> cheapest partial path happens to already be sorted, then I don't
>> believe we'll add any paths. And if that happens then set_cheapest
>> will error with the message "could not devise a query plan for the
>> given query". So I propose we add a similar guard to this call point.
>
>
> I don't believe that would happen.  It seems to me that we should, at
> the very least, have a path which is Gather on top of the cheapest
> partial path (see generate_gather_paths), as long as the
> partially_grouped_rel has partial paths.

It will have partial paths because it's nested inside "if
(partially_grouped_rel && partially_grouped_rel->partial_pathlist)"

David






view thread (4+ messages)

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: set_cheapest without checking pathlist
  In-Reply-To: <CAApHDvrF2LStybjHzxjPHbEAphgqRGcPiBOq1wLvC_5POUNysg@mail.gmail.com>

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

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