Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Luis Carril <luis(dot)carril(at)swarm64(dot)com>, Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>, PG Bug reporting form <noreply(at)postgresql(dot)org>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction
Date: 2018-12-19 02:52:09
Message-ID: 6daa6d4a-d4a9-bd2c-0b84-c4e31d2b9844@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 2018/12/19 11:38, Michael Paquier wrote:
> On Wed, Dec 19, 2018 at 10:19:58AM +0900, Amit Langote wrote:
>> Not sure that's a good name to give to the test file, although since I'm
>> not greatly enthusiastic about adding a TAP test for this, I don't have a
>> good suggestion. Maybe, choose a more generic name? Michael, any
>> suggestions?
>
> I have looked at the proposal seriously myself, and adding a TAP test
> for that edge case is overdoing it. So why not just adding a test to
> postgres_fdw.sql? The failure can be triggered with installcheck and
> wal_level =3D minimal. Not everybody tests with non-default options, but
> some of us do.

Yeah, I said that upthread.

> Attached is a more simple, updated, patch which adds a new test and a
> comment. I would rather not play with the semantics of heap_sync() on
> the back branches as well as on a thread dealing with a bug about COPY
> with foreign tables. Such discussions deserve a larger audience on
> -hackers.

+1

Patch looks good, by the way.

> it is a bit funny to see COPY FREEZE working for foreign tables
> actually, but perhaps this has some use-cases for some FDWs, so I'd
> rather not touch it.

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.

Thanks,
Amit

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2018-12-19 03:51:57 Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction
Previous Message Michael Paquier 2018-12-19 02:38:14 Re: BUG #15552: Unexpected error in COPY to a foreign table in a transaction