pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor ChangeVarNodesExtended() using the custom callback
Date: Sat, 03 May 2025 19:32:56 +0000
Message-ID: <E1uBIbY-000owH-0O@gemulon.postgresql.org> (raw)

Refactor ChangeVarNodesExtended() using the custom callback

fc069a3a6319 implemented Self-Join Elimination (SJE) and put related logic
to ChangeVarNodes_walker().  This commit provides refactoring to remove the
SJE-related logic from ChangeVarNodes_walker() but adds a custom callback to
ChangeVarNodesExtended(), which has a chance to process a node before
ChangeVarNodes_walker().  Passing this callback to ChangeVarNodesExtended()
allows SJE-related node handling to be kept within the analyzejoins.c.

Reported-by: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/CAMbWs49PE3CvnV8vrQ0Dr%3DHqgZZmX0tdNbzVNJxqc8yg-8kDQQ%40mail.gmail.com
Author: Andrei Lepikhov <lepihov@gmail.com>
Author: Alexander Korotkov <aekorotkov@gmail.com>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/250a718aadad68793e82103282247556a46a3cfc

Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c | 160 +++++++++++++++++++++++++++---
src/backend/rewrite/rewriteManip.c        | 138 ++++++--------------------
src/include/rewrite/rewriteManip.h        |  17 +++-
src/tools/pgindent/typedefs.list          |   1 +
4 files changed, 192 insertions(+), 124 deletions(-)



view thread (13+ messages)  latest in thread

Message-ID: <E1uBIbY-000owH-0O@gemulon.postgresql.org>
Permalink:  ../E1uBIbY-000owH-0O@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uBIbY-000owH-0O@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Refactor ChangeVarNodesExtended() using the custom callback
  In-Reply-To: <E1uBIbY-000owH-0O@gemulon.postgresql.org>

* 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