From: Tom Lane <tgl@sss.pgh.pa.us>
To: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: thomas.munro@enterprisedb.com
Cc: eric.cyr@gmail.com
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: BUG #15449: file_fdw using program cause exit code error when using LIMIT
Date: Fri, 16 Nov 2018 12:20:51 -0500
Message-ID: <30744.1542388851@sss.pgh.pa.us> (raw)
In-Reply-To: <5BEA9E82.1080709@lab.ntt.co.jp>
References: <5BE4318F.4040002@lab.ntt.co.jp>
<20181109.143931.243136889.horiguchi.kyotaro@lab.ntt.co.jp>
<5BE552ED.4040304@lab.ntt.co.jp>
<20181112.185214.76711162.horiguchi.kyotaro@lab.ntt.co.jp>
<5BE966F4.1040702@lab.ntt.co.jp>
<5BEA9E82.1080709@lab.ntt.co.jp>
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp> writes:
> * I think it's better to ignore the SIGPIPE failure in
> ClosePipeToProgram if we were in a COPY FROM PROGRAM that was allowed to
> terminate early and keep the behavior as-is otherwise. If we ignore
> that failure unconditionally in that function, eg, COPY TO PROGRAM would
> fail to get a (better) error message in CopySendEndOfRow or EndCopy when
> the invoked program was terminated on SIGPIPE, as discussed before [1].
> And to do so, I added a new argument to BeginCopyFrom to specify
> whether COPY FROM PROGRAM can terminate early or not.
If we do that, it makes this not back-patchable, I fear --- the fact
that file_fdw is calling BeginCopyFrom seems like sufficient evidence
that there might be third-party callers who would object to an API
break in minor releases. That seems unfortunate for a bug fix.
Are we sufficiently convinced that we must have the dont-allow-partial
option to not fix this in the back branches? I'm not.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, fujita.etsuro@lab.ntt.co.jp, horiguchi.kyotaro@lab.ntt.co.jp, thomas.munro@enterprisedb.com, eric.cyr@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: BUG #15449: file_fdw using program cause exit code error when using LIMIT
In-Reply-To: <30744.1542388851@sss.pgh.pa.us>
* 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