Re: Add on_error and log_verbosity options to file_fdw - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Add on_error and log_verbosity options to file_fdw
Date
Msg-id 1b24fcc9-0f18-40bf-b532-ab4cbe4b9e32@oss.nttdata.com
Whole thread Raw
In response to Add on_error and log_verbosity options to file_fdw  (torikoshia <torikoshia@oss.nttdata.com>)
List 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




pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: pgsql: Improve default and empty privilege outputs in psql.
Next
From: Andres Freund
Date:
Subject: AIO writes vs hint bits vs checksums