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 1swHkd-002svk-JU for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Oct 2024 09:04:00 +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 1swHkb-00C03C-UT for pgsql-hackers@arkaria.postgresql.org; Thu, 03 Oct 2024 09:03:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1swHkb-00C033-KF for pgsql-hackers@lists.postgresql.org; Thu, 03 Oct 2024 09:03:57 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1swHkX-002Gd0-UJ for pgsql-hackers@postgresql.org; Thu, 03 Oct 2024 09:03:55 +0000 Received: from [192.168.11.3] (p3610184-ipxg13101funabasi.chiba.ocn.ne.jp [60.45.23.184]) by oss.nttdata.com (Postfix) with ESMTPSA id 7A5B360172; Thu, 3 Oct 2024 18:03:49 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: Date: Thu, 3 Oct 2024 18:03:48 +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: Masahiko Sawada Cc: torikoshia , Michael Paquier , 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> <1b24fcc9-0f18-40bf-b532-ab4cbe4b9e32@oss.nttdata.com> <6383a9a5b90a36dbe60c6f30286d2254@oss.nttdata.com> <9fb4e232-88dc-4554-8a4f-ba307a52f9da@oss.nttdata.com> From: Fujii Masao In-Reply-To: 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/10/03 13:23, Masahiko Sawada wrote: > On Tue, Oct 1, 2024 at 11:34 PM Fujii Masao wrote: >> >> >> >> On 2024/10/02 9:27, Masahiko Sawada wrote: >>> Sorry for being late in joining the review of this patch. Both 0001 >>> and 0003 look good to me. I have two comments on the 0002 patch: >> >> Thanks for the review! >> >>> I think that while scanning a file_fdw foreign table with >>> log_verbosity='silent' the query is not interruptible. >> >> You're right. I added CHECK_FOR_INTERRUPTS() in the retry loop. >> >>> Also, we don't switch to the per-tuple memory context when retrying >>> due to a soft error. I'm not sure it's okay as in CopyFrom(), a >>> similar function for COPY command, we switch to the per-tuple memory >>> context every time before parsing an input line. Would it be >>> problematic if we switch to another memory context while parsing an >>> input line? In CopyFrom() we also call ResetPerTupleExprContext() and >>> ExecClearTuple() for every input, so we might want to consider calling >>> them for every input. >> >> Yes, I've updated the patch based on your comment. >> Could you please review the latest version? > > Thank you for updating the patch! All patches look good to me. Thanks for the review! Pushed. BTW, regarding the issue I mentioned earlier about file_fdw not reporting the number of tuples processed and skipped in the pg_stat_progress_copy view, I'll start a new thread to discuss this further. Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION