From: | Amit Langote <amitlangote09(at)gmail(dot)com> |
---|---|
To: | Alexander Pyhalov <a(dot)pyhalov(at)postgrespro(dot)ru> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: join pushdown and issue with foreign update |
Date: | 2021-06-01 12:47:40 |
Message-ID: | CA+HiwqHnLESTUQUQ3-MBxOatPK4P4uu2Br3+6KRxFfbBO=HgFw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Tue, Jun 1, 2021 at 1:04 AM Alexander Pyhalov
<a(dot)pyhalov(at)postgrespro(dot)ru> wrote:
>
> Alexander Pyhalov писал 2021-05-31 15:39:
> > Hi.
> >
> > There's issue with join pushdown after
> >
> > commit 86dc90056dfdbd9d1b891718d2e5614e3e432f35
> > Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> > Date: Wed Mar 31 11:52:34 2021 -0400
> >
> ...
> > You'll get
> > ERROR: input of anonymous composite types is not implemented
> > CONTEXT: whole-row reference to foreign table "remote_tbl"
Interesting, thanks for reporting this. This sounds like a regression
on 86dc90056's part.
> > make_tuple_from_result_row() (called by fetch_more_data()), will try
> > to call InputFunctionCall() for ROW(r1.a, r1.b) and will get error in
> > record_in().
> >
> > Here ROW(r2.a, r2.b) would have attribute type id, corresponding to
> > remote_tbl, but ROW(r1.a, r1.b) would have atttypid 2249 (RECORD).
> >
>
> The issue seems to be that add_row_identity_columns() adds RECORD var to
> the query.
> Adding var with table's relation type fixes this issue, but breaks
> update of
> partitioned tables, as we add "wholerow" with type of one child relation
> and then
> try to use it with another child (of different table type).
Perhaps, we can get away with adding the wholerow Var with the target
relation's reltype when the target foreign table is not a "child"
relation, but the root target relation itself. Maybe like the
attached?
--
Amit Langote
EDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
wholerow-rowid-var-vartype-fix.patch | application/octet-stream | 3.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bharath Rupireddy | 2021-06-01 14:01:51 | Re: Alias collision in `refresh materialized view concurrently` |
Previous Message | Pavel Stehule | 2021-06-01 12:41:13 | Re: security_definer_search_path GUC |