pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Marc Rechté <marc4@rechte.fr>
Cc: PostgreSQL www <pgsql-www@postgresql.org>
Subject: Re: Backend Flowchart / Developer doc
Date: Thu, 23 Apr 2020 13:06:26 -0400
Message-ID: <20200423170626.GB4210@momjian.us> (raw)
In-Reply-To: <20200421153109.GD19613@momjian.us>
References: <f22d0dc9-07a6-5526-625a-3bc349639286@rechte.fr>
	<20200416151729.GA9284@alvherre.pgsql>
	<20200421153109.GD19613@momjian.us>


Thread moved to www for patch application.  Please apply the attached
patch to update the text of the backend flowchart.  Thanks.

---------------------------------------------------------------------------

On Tue, Apr 21, 2020 at 11:31:09AM -0400, Bruce Momjian wrote:
> On Thu, Apr 16, 2020 at 11:17:29AM -0400, Alvaro Herrera wrote:
> > On 2020-Apr-15, Marc Rechté wrote:
> > 
> > > Hello,
> > > 
> > > Don't know if this the correct list to submit this issue.
> > > 
> > > On the https://www.postgresql.org/developer/backend/, it mentions a
> > > Query.qual field which does not exist in the Query structure.
> > 
> > I think that diagram (and the accompanying wiki page) requires a *lot*
> > of more significant updating than just that field.  It is wildly
> > outdated.
> 
> I developed the attached patch to fix the items I saw needed updating.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +

Attachments:

backend.diff (text/x-diff, 2.7K) download diff --git a/templates/pages/developer/backend.html b/templates/pages/developer/backend.html index ab7e5d6..7337a07 100644 --- a/templates/pages/developer/backend.html +++ b/templates/pages/developer/backend.html @@ -56,7 +56,7 @@ or <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">SelectStmt.</a></p> <p>The statement is then identified as complex (<em>SELECT / INSERT / -UPDATE / DELETE</em>) or simple, e.g <em>CREATE USER, ANALYZE,</em> +UPDATE / DELETE</em>) or simple, e.g <em>CREATE ROLE, ANALYZE,</em> etc. Simple utility commands that do not require the executor are processed by statement-specific functions in the <a href="https://wiki.postgresql.org/wiki/Backend_flowchart#commands">commands</a> module. Complex statements require more handling.</p> @@ -64,11 +64,12 @@ Complex statements require more handling.</p> <p>The parser takes a complex query, and creates a <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">Query</a> structure that contains all the elements used by complex queries. -Query.qual holds the <em>WHERE</em> clause qualification, which is filled +Query.jointree holds the <em>FROM</em> and <em>WHERE</em> clauses, which is filled in by <a +href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c">transformFromClause()</a> and href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c">transformWhereClause().</a> Each table referenced in the query is represented by a <a -href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">RangeTableEntry,</a> +href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/parsenodes.h">RangeTblEntry,</a> and they are linked together to form the <em>range table</em> of the query, which is generated by <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/parser/parse_clause.c">transformFromClause().</a> @@ -95,8 +96,8 @@ system.</p> <p>The <a href="https://wiki.postgresql.org/wiki/Backend_flowchart#optimizer_path">optimizer</a> uses the Query structure to determine the best table join order and join -type of each table in the RangeTable, using Query.qual(<em>WHERE</em> -clause) to consider optimal index usage.</p> The <a +type of each table in the RangeTable, using Query.jointree(<em>FROM</em> +and <em>WHERE</em> clauses) to consider optimal index usage.</p> The <a href="https://wiki.postgresql.org/wiki/Backend_flowchart#optimizer_path">path</a> module then generates an optimal <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/plannodes.h">Plan,</a>

view thread (7+ messages)  latest in thread

Message-ID: <20200423170626.GB4210@momjian.us>
Permalink:  ../20200423170626.GB4210@momjian.us/
Also on:    postgresql.org/message-id/20200423170626.GB4210@momjian.us

 ·  · 

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: pgsql-docs@postgresql.org
  Cc: bruce@momjian.us, alvherre@2ndquadrant.com, marc4@rechte.fr, pgsql-www@postgresql.org
  Subject: Re: Backend Flowchart / Developer doc
  In-Reply-To: <20200423170626.GB4210@momjian.us>

* 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