Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116 - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116
Date
Msg-id CAFjFpRe3poU4W9SfGShfBG1tU3PA9Sti9S-d5hEpmUT6dxp+CQ@mail.gmail.com
Whole thread
In response to Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116  (Amit Langote <amitlangote09@gmail.com>)
Responses Re: [sqlsmith] Failed assertion in postgres_fdw/deparse.c:1116
List pgsql-hackers
On further thought, I think we need to restrict the join pushdown only for outer joins. Only those joins can produce NULL rows. If we go with that change, we will need my changes as well and a testcase with inner join.

On Tue, Jun 7, 2016 at 6:19 PM, Amit Langote <amitlangote09@gmail.com> wrote:
On Tue, Jun 7, 2016 at 7:47 PM, Ashutosh Bapat wrote:
> On Tue, Jun 7, 2016 at 4:07 PM, Amit Langote wrote:
>> On 2016/06/07 19:13, Ashutosh Bapat wrote:
>> > So, your patch looks to be the correct approach (even after we support
>> > deparsing subqueries). Can you please include a test in regression?
>>
>> I added a slightly modified version of your test to the originally posted
>> patch.
>>
> Looks good to me. If we add a column from the outer relation, the "NULL"ness
> of inner column would be more clear. May be we should tweak the query to
> produce few more rows, some with non-NULL columns from both the relations.
> Also add a note to the comment in the test mentioning that such a join won't
> be pushed down for a reader to understand the EXPLAIN output. Also, you
> might want to move that test, closer to other un-pushability tests.

Done in the attached.  Please check if my comment explains the reason
of push-down failure correctly.

Thanks,
Amit



--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Reviewing freeze map code
Next
From: Andres Freund
Date:
Subject: Re: Reviewing freeze map code