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 1sWZUD-00Fzbd-JV for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jul 2024 10:44:45 +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 1sWZTD-003SWe-IE for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Jul 2024 10:43:43 +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 1sWZTD-003SVv-8i for pgsql-hackers@lists.postgresql.org; Wed, 24 Jul 2024 10:43:43 +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 1sWZTA-001Bi3-OR for pgsql-hackers@postgresql.org; Wed, 24 Jul 2024 10:43:42 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 98E4161637; Wed, 24 Jul 2024 19:43:37 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 24 Jul 2024 19:43:37 +0900 From: torikoshia To: Michael Paquier , sawada.mshk@gmail.com Cc: Pgsql Hackers Subject: Re: Add on_error and log_verbosity options to file_fdw In-Reply-To: References: <841721f3ca9a69574a72eb141c83933c@oss.nttdata.com> User-Agent: Roundcube Webmail/1.4.11 Message-ID: X-Sender: torikoshia@oss.nttdata.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-07-23 08:57, Michael Paquier wrote: > On Mon, Jul 22, 2024 at 03:07:46PM -0700, Masahiko Sawada wrote: >> I'm slightly concerned that users might not want to see the NOTICE >> message for every scan. Unlike COPY FROM, scanning a file via file_fdw >> could be frequent. Agreed. > Yeah, I also have some concerns regarding the noise that this could > produce if called on a foreign table on a regular basis. The verbose > mode is disabled by default so I don't see why we should not allow it > if the relation owner wants to show it. > > Perhaps we should first do a silence mode for log_verbosity to skip > the NOTICE produced at the end of the COPY FROM summarizing the whole? I like this idea. If there are no objections, I'm going to make a patch for this. > It would be confusing to have different defaults between COPY and > file_fdw, but having the option to silence that completely is also > appealing from the user point of view. I'm not sure we should change the defaults. If the default of file_fdw is silence mode, I am a little concerned that there may be cases where people think they have no errors, but in fact they have. >> QUERY PLAN >> ---------------------------------------------------------------- >> Foreign Scan on public.test (cost=0.00..1.10 rows=1 width=12) >> Output: a, b, c >> Foreign File: test.csv >> Foreign File Size: 12 b >> Skipped Rows: 10 > > Interesting idea linked to the idea of pushing the error state to > something else than the logs. Sounds like a separate feature. +1 -- Regards, -- Atsushi Torikoshi NTT DATA Group Corporation