public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Richard Guo <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Remove some redundant set_cheapest() calls
Date: Tue, 26 Mar 2024 16:06:58 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAMbWs4-KFEU_fDuJPNCOkUu3rwvZvKBEytkd9VrM4kH4-2h1CQ@mail.gmail.com>
References: <CAMbWs4-KFEU_fDuJPNCOkUu3rwvZvKBEytkd9VrM4kH4-2h1CQ@mail.gmail.com>
Richard Guo <[email protected]> writes:
> I happened to notice that the set_cheapest() calls in functions
> set_namedtuplestore_pathlist() and set_result_pathlist() are redundant,
> as we've centralized the set_cheapest() calls in set_rel_pathlist().
> Attached is a trivial patch to remove these calls.
Agreed, and pushed.
> BTW, I suspect that the set_cheapest() call in set_dummy_rel_pathlist()
> is also redundant. The comment there says "This is redundant when we're
> called from set_rel_size(), but not when called from elsewhere". I
> doubt it. The other places where it is called are set_append_rel_size()
> and set_subquery_pathlist(), both being called from set_rel_size(). So
> set_cheapest() would ultimately be called in set_rel_pathlist().
I'm less convinced about changing this. I'd rather keep it consistent
with mark_dummy_rel.
regards, tom lane
view thread (2+ 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]
Subject: Re: Remove some redundant set_cheapest() calls
In-Reply-To: <[email protected]>
* 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