Re: join pushdown and issue with foreign update

From: Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Amit Langote <amitlangote09(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: join pushdown and issue with foreign update
Date: 2021-06-02 08:35:09
Message-ID: acf79e524b9a25617ba00410393b8351@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane писал 2021-06-02 00:32:
> I wrote:
>> I think a preferable fix involves making sure that the correct
>> record-type typmod is propagated to record_in in this context.
>> Alternatively, maybe we could insert the foreign table's rowtype
>> during execution of the input operation, without touching the
>> plan as such.
>
> Here's a draft-quality patch based on that idea. It resolves
> the offered test case, but I haven't beat on it beyond that.
>
> regards, tom lane

Hi.
The patch seems to work fine for mentioned case.
For now I'm working on function pushdown. When record-returning function
(like unnest())
is pushed down, on this stage we've already lost any type information,
so get the issue again.
So far I'm not sure how to fix the issue, perhaps just avoid pushing
foreign join if we have
record, corresponding to function RTE var in joinrel->reltarget?

--
Best regards,
Alexander Pyhalov,
Postgres Professional

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-06-02 08:39:56 Re: TAP tests still sensitive to various PG* environment variables
Previous Message Michael Paquier 2021-06-02 08:02:10 Re: Two patches to speed up pg_rewind.