From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Richard Guo <guofenglinux(at)gmail(dot)com> |
Cc: | tharakan(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17768: Assert triggered on initsplan.c |
Date: | 2023-02-03 00:47:25 |
Message-ID: | 1600595.1675385245@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Richard Guo <guofenglinux(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2023-02-03 06:10:33 | Re: BUG #17769: Assert triggered in indxpath.c |
Previous Message | PG Bug reporting form | 2023-02-02 18:18:54 | BUG #17770: SELECT FOR UPDATE on a UNION ALL view doesn't raise an error |