From: Alexander Pyhalov <a.pyhalov@postgrespro.ru>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: join pushdown and issue with foreign update
Date: Mon, 31 May 2021 19:04:17 +0300
Message-ID: <ae6d414df6165d50ec9db4265f999c14@postgrespro.ru> (raw)
In-Reply-To: <7817fb9ebd6661cdf9b67dec6e129a78@postgrespro.ru>
References: <7817fb9ebd6661cdf9b67dec6e129a78@postgrespro.ru>
Alexander Pyhalov писал 2021-05-31 15:39:
> Hi.
>
> There's issue with join pushdown after
>
> commit 86dc90056dfdbd9d1b891718d2e5614e3e432f35
> Author: Tom Lane <tgl@sss.pgh.pa.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"
>
> 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).
--
Best regards,
Alexander Pyhalov,
Postgres Professional
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: a.pyhalov@postgrespro.ru
Subject: Re: join pushdown and issue with foreign update
In-Reply-To: <ae6d414df6165d50ec9db4265f999c14@postgrespro.ru>
References: <7817fb9ebd6661cdf9b67dec6e129a78@postgrespro.ru> <ae6d414df6165d50ec9db4265f999c14@postgrespro.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox