Re: Remove some redundant set_cheapest() calls - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove some redundant set_cheapest() calls
Date
Msg-id 3166037.1711483618@sss.pgh.pa.us
Whole thread Raw
In response to Remove some redundant set_cheapest() calls  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Remove some redundant set_cheapest() calls
List pgsql-hackers
Richard Guo <guofenglinux@gmail.com> 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



pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: New Table Access Methods for Multi and Single Inserts
Next
From: "Euler Taveira"
Date:
Subject: Re: speed up a logical replica setup