Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction - Mailing list pgsql-bugs

From Amit Langote
Subject Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction
Date
Msg-id 9c0508a1-da8e-b122-a3c7-61b2cbe4e10c@lab.ntt.co.jp
Whole thread Raw
In response to Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction  (Michael Paquier <michael@paquier.xyz>)
Responses Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
On 2018/12/19 12:51, Michael Paquier wrote:
> On Wed, Dec 19, 2018 at 11:52:09AM +0900, Amit Langote wrote:
>> Hmm, note that we don't pass CopyState->freeze option to the FDW drivers
>> today, though we may in the future when we add an *actual* COPY interface
>> to FDWs.  Wouldn't it be a good idea to prevent specifying the FREEZE
>> option for foreign tables as COPY targets until then?  Of course, that's
>> something for -hackers to consider.
> 
> No idea if that will happen.

It may happen sooner that you may think. :)

Currently, COPY into foreign tables uses APIs used by INSERT, so one row
at a time interface.  It'd certainly be better to allow FDWs to be able to
do bulk transfer.  I think Fujita-san has said he wants to work on that:

https://www.postgresql.org/message-id/5AB4F190.1000804%40lab.ntt.co.jp

> One argument for doing nothing yet is that
> this command does not fail now so changing it may cause compatibility
> problems.

Just FYI, COPYing into foreign tables is only supported as of PG 11.

Thanks,
Amit




pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction
Next
From: Michael Paquier
Date:
Subject: Re: BUG #15552: Unexpected error in COPY to a foreign table in atransaction