Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1st7kI-00DkMc-01 for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Sep 2024 15:46:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1st7kH-009dI9-4b for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Sep 2024 15:46:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1st7kG-009dI1-RJ for pgsql-hackers@lists.postgresql.org; Tue, 24 Sep 2024 15:46:32 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1st7kC-000rhL-Fo for pgsql-hackers@postgresql.org; Tue, 24 Sep 2024 15:46:32 +0000 Received: from [192.168.11.3] (p4060217-ipxg13601funabasi.chiba.ocn.ne.jp [153.216.201.217]) by oss.nttdata.com (Postfix) with ESMTPSA id 92809615B1; Wed, 25 Sep 2024 00:46:24 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <1b24fcc9-0f18-40bf-b532-ab4cbe4b9e32@oss.nttdata.com> Date: Wed, 25 Sep 2024 00:46:24 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add on_error and log_verbosity options to file_fdw Content-Language: en-US To: torikoshia Cc: Michael Paquier , sawada.mshk@gmail.com, Pgsql Hackers References: <841721f3ca9a69574a72eb141c83933c@oss.nttdata.com> <79a336ccebc70401625743686c41b81a@oss.nttdata.com> <5739a8ee4320a31ca04752fe3972aa73@oss.nttdata.com> <81844000-703c-408a-9296-14f5e176098d@oss.nttdata.com> <156b2c1bfe27441aa5e59a52d0af5142@oss.nttdata.com> From: Fujii Masao In-Reply-To: <156b2c1bfe27441aa5e59a52d0af5142@oss.nttdata.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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