Re: Enhance file_fdw to report processed and skipped tuples in COPY progress

Fujii Masao <masao.fujii@oss.nttdata.com>

From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Kirill Reshke <reshkekirill@gmail.com>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2025-03-05T16:13:00Z
Lists: pgsql-hackers

On 2024/11/30 15:23, Kirill Reshke wrote:
> On Fri, 11 Oct 2024 at 06:53, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>> However, this issue already exists without the proposed patch.
>> Since file_fdw already reports progress partially, querying multiple
>> file_fdw tables can lead to inaccurate or confusing progress reports.
>> You can even observe this when analyzing a file_fdw table and also
>> when copying to the table with a trigger that executes progress-reporting
>> commands.
>>
>> So, I don’t think this issue should block the proposed patch.
>> In fact, progress reporting is already flawed in these scenarios,
>> regardless of whether the patch is applied.

On second thought, supporting progress tracking for COPY used by file_fdw
could increase the chances of multiple commands being tracked simultaneously
by a single backend. This means the command progress view might show
incorrect results more often.

As I mentioned before, this issue already exists, but it currently
only happens in rare cases. I don’t think the fact that the issue
already exists is a good reason to introduce more, and likely more common,
scenarios where it could occur.

With that in mind, I'm thinking of withdrawing this patch for now.

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION