pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: tharakan@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17768: Assert triggered on initsplan.c
Date: Thu, 02 Feb 2023 19:47:25 -0500
Message-ID: <1600595.1675385245@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs48Ggc419o1c14OLa=MtP_mgXMv=Y0h=3UcKKugCGiOQyw@mail.gmail.com>
References: <17768-5ac8730ece54478f@postgresql.org>
	<CAMbWs490BcsZqXF+foXiQ0zdw-FffZJA6+vBNYtJF0vkDyJ98g@mail.gmail.com>
	<CAMbWs48Ggc419o1c14OLa=MtP_mgXMv=Y0h=3UcKKugCGiOQyw@mail.gmail.com>

Richard Guo <guofenglinux@gmail.com> writes:
>> There is something wrong about postponing quals.  We are supposed to
>> postpone quals only from children to their parent nodes.  But here in
>> deconstruct_distribute we scan all the jointree nodes in depth-first
>> traversal order and any quals postponed by left children may be checked
>> against right children.  If the right subtree is an outer join as in
>> this example, the assertion would be triggered.

> To fix this issue, I'm considering that we can add two types of info in
> JoinTreeItem for each jointree node, one is the jointree's children, and
> one is the list of quals that need to be postponed at this join level.
> Thus in deconstruct_distribute we can process the quals postponed by
> children.

I've not looked closely at this, but ... I remember thinking while
revising deconstruct_jointree that the whole PostponedQual mechanism
was a wart we should try to get rid of.  I didn't touch it since
I saw no obvious bugs and the patch was too large already, but maybe
now is the time to try harder.  In any case I suspect you are right
that the core of this issue is that we're dealing with PostponedQuals
in the wrong order now.

			regards, tom lane





view thread (5+ messages)  latest in thread

Message-ID: <1600595.1675385245@sss.pgh.pa.us>
Permalink:  ../1600595.1675385245@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1600595.1675385245@sss.pgh.pa.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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, guofenglinux@gmail.com, tharakan@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17768: Assert triggered on initsplan.c
  In-Reply-To: <1600595.1675385245@sss.pgh.pa.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