Re: Optimizer docs typos

From: Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Daniel Gustafsson <daniel(at)yesql(dot)se>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Optimizer docs typos
Date: 2020-05-21 06:36:10
Message-ID: CAPmGK17Bmp4AHoi1c8qvNiq6k00xq68Okx7RDPB6PeY1kd+Q8A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 21, 2020 at 11:25 AM Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)com> wrote:
> At Wed, 20 May 2020 19:17:48 +0900, Etsuro Fujita <etsuro(dot)fujita(at)gmail(dot)com> wrote in
> > Here is a patch including the change I proposed. (Yet another thing I
> > noticed is the indent spaces for join_search_one_level(): that
> > function is called within standard_join_search(), so it would be
> > better to have one extra space, for consistency with others (eg,
> > set_base_rel_pathlists() called from make_one_rel()), but that would
> > be too nitpicking.) This is more like an improvement, so I'll apply
> > the patch to HEAD only, if no objestions.

> The description for make_rel_from_joinlist() and that for
> standard_join_search() are at the same indentation depth. And it is
> also strange that seemingly there is no line for level-5
> indentation. If we make standard_join_search() a 6th-hyphened level
> item, indentation of the surrounding descriptions needs a fix.
>
> ----make_one_rel()
> set_base_rel_pathlists()
> find seqscan and all index paths for each base relation
> find selectivity of columns used in joins
> make_rel_from_joinlist()
> hand off join subproblems to a plugin, GEQO, or standard_join_search()
> ------standard_join_search()
> call join_search_one_level() for each level of join tree needed
> join_search_one_level():
> For each joinrel of the prior level, do make_rels_by_clause_joins()
> if it has join clauses, or make_rels_by_clauseless_joins() if not.

I don't think it's odd that we won't have 5-dashes indentation,
because I think we have 5-spaces indentation for
set_base_rel_pathlists() and make_rel_from_joinlist(). (I think the
dash indentation of optimizer functions such as standard_join_search()
just means that the dash-indented functions are more important
compared to other space-indented functions IMO.) My point is that we
should adjust the dash or space indentation so that a deeper level of
indentation indicates that the outer optimizer function calls the
inner optimizer function.

Thanks!

Best regards,
Etsuro Fujita

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message chenhj 2020-05-21 06:36:40 [Proposal] Page Compression for OLTP
Previous Message Michael Paquier 2020-05-21 06:35:48 Schedule of commit fests for PG14