Re: Assert failure of the cross-check for nullingrels

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Assert failure of the cross-check for nullingrels
Date: 2023-03-17 03:05:03
Message-ID: CAMbWs4_mk1e2=h46DaYetsh-17xr6icNvayVzb9BqLBK30=xkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 13, 2023 at 5:44 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:

> On Mon, Mar 13, 2023 at 5:03 PM Richard Guo <guofenglinux(at)gmail(dot)com>
> wrote:
>
>> Back to the original issue, if a join has more than one quals, actually
>> we treat them as a whole when we check if identity 3 applies as well as
>> when we adjust them to be suitable for commutation according to identity
>> 3. So when we check if a qual is computable at a given level, I think
>> we should also consider the join's quals as a whole. I'm thinking that
>> we use a 'group' notion for RestrictInfos and then use the clause_relids
>> of the 'group' in clause_is_computable_at. Does this make sense?
>>
>
> I'm imagining something like attached (no comments and test cases yet).
>

Here is an updated patch with comments and test case. I also change the
code to store 'group_clause_relids' directly in RestrictInfo.

Thanks
Richard

Attachment Content-Type Size
v2-0001-Check-group_clause_relids-to-see-if-a-clause-is-computable.patch application/octet-stream 6.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2023-03-17 03:14:56 Re: gcc 13 warnings
Previous Message Amit Kapila 2023-03-17 03:05:02 Re: Allow logical replication to copy tables in binary format