Re: Add on_error and log_verbosity options to file_fdw

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, sawada(dot)mshk(at)gmail(dot)com, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add on_error and log_verbosity options to file_fdw
Date: 2024-09-24 15:46:24
Message-ID: 1b24fcc9-0f18-40bf-b532-ab4cbe4b9e32@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2024/09/24 20:08, torikoshia wrote:
> Thanks for the explanation and suggestion.
> Since there is almost the same code in copyfrom.c, attached 0003 patch for refactoring both.

Thanks for updating the patches!

Regarding 0002.patch, I think it’s better to include the refactored code
from the start rather than adding redundant code intentionally.
How about leaving just the refactor in copyfrom.c to 0003.patch?
If that works, as a refactoring, you could also replace "skipped" with
"cstate->num_errors" in that patch, as you suggested earlier.

While reviewing again, I noticed that running ANALYZE on a file_fdw
foreign table also calls NextCopyFrom(), but it doesn’t seem to
skip erroneous rows when on_error is set to "ignore." This could lead
to inaccurate statistics. Shouldn’t ANALYZE on file_fdw foreign tables
with on_error=ignore also skip erroneous rows?

>> The tab-completion needs to be updated to support the "silent" option?
>
> Yes, updated 0002 patch.

Thanks! Also, this should be part of 0001.patch since "silent" is
introduced there, right?

Regards,

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2024-09-24 15:55:08 AIO writes vs hint bits vs checksums
Previous Message Christoph Berg 2024-09-24 15:14:42 Re: pgsql: Improve default and empty privilege outputs in psql.