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 1sW2ug-00Cxl0-LD for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2024 23:57:54 +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 1sW2ue-0087Tf-6b for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Jul 2024 23:57:52 +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 1sW2ud-0087TX-T8 for pgsql-hackers@lists.postgresql.org; Mon, 22 Jul 2024 23:57:52 +0000 Received: from fout8-smtp.messagingengine.com ([103.168.172.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sW2uX-000wd1-LY for pgsql-hackers@postgresql.org; Mon, 22 Jul 2024 23:57:51 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id C50781380053; Mon, 22 Jul 2024 19:57:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 22 Jul 2024 19:57:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1721692664; x=1721779064; bh=d5HlwMyVOx XukoN0g0nRIGIh4uDnNPvPcSe6nJIL/zM=; b=QMyFKQ4QOoEaJvaAx/RScDlXek C5VuI6TJG7JqAxIHaamnlZaQtQYBzYjWuesUnHL9WE6s5BN2bpyZ8AZm3G2cVNsL I3SFuMZsvfcM1HgUnbgSVD+W8u8sLpeRP7ZjrmGBYv+Z/ndigNBphG0/7j4TwXbj lbqR/rtcFP202g9mLo1U40spmsF3qFUUbcAxg43rWfJzoCpm+IARVrkIIkJM+8tp WR2Hlm25NB6Z/rBDI/RacRk/0mbWga2OPz3ZiTczuNEQqD4H2fFb+Sk6TmhShKkz ZmTROw2qRbKZR7a1qc6sj5GRoITm2UpblDxfD0oDedFXqWUIRoKhhouIPzjA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1721692664; x=1721779064; bh=d5HlwMyVOxXukoN0g0nRIGIh4uDn NPvPcSe6nJIL/zM=; b=THr2DAbakmufRMJXACWEDotP+0JjE1JPpsCmJg4Af21q yhNLKzAnItzUORMHlgM1Lu3UsxSEHGUIdYMXmLhVWiTbIfcsZcz7ci/p+4HXSgTR k/PBA/1DUyz7G4Ui3ahkQP6VZdZZBQVlBY3AvV9yLROkXuPzan0gZnBRWhd8CMtr Yh5guTUQSp4NKmONCvoEaYp88qmPTu1UMRA4CDOU+xNTaivQ3bvieM73NwztgxrF t4h9AtyFXciuv29pB1gpCIX3dJ5JA+qc5mV+ON3uwuZx3lvfDgKGLreo8L2OaYmi iFpIeLkAfIaL8oCQfqdOu32bx/trlNvePBUwfoUKHA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrheekgddvlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Jul 2024 19:57:42 -0400 (EDT) Date: Tue, 23 Jul 2024 08:57:37 +0900 From: Michael Paquier To: Masahiko Sawada Cc: torikoshia , Pgsql Hackers Subject: Re: Add on_error and log_verbosity options to file_fdw Message-ID: References: <841721f3ca9a69574a72eb141c83933c@oss.nttdata.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5156sOm2JBj5jbFq" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --5156sOm2JBj5jbFq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. An alternative idea of place to write the > information of the number of malformed rows would be the EXPLAIN > command as follow: 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? 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. > 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. > IIUC we have to execute ALTER FOREIGN TABLE to change the > log_verbosity value and which requires to be the owner. Which seems > not to be user-friendly. I am not sure about allowing scans to force an option to be a different thing at runtime vs what's been defined in the relation itself with CREATE/ALTER. -- Michael --5156sOm2JBj5jbFq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmae8fEACgkQnvQgOdby QH1/7w//blne8JEspQjX0oOqhd/Ovm/NqKOE7538LyFW52klwMqVfpXHvuHOn1Fk qDB/5n66gRfuu5e42VG28GOktowedYbn30GEg7f3p71Pak+8aWYpVOkhECTf/qOD ZowIv3y8cAFtMoO+6nHh6WQ1GxeczEMzWGpD/EpT+b39WGl707Xgyc5guXDxqrdw IbSYA7/0kTbiGhWl27xBepBDcFBczJjQTN1R5VyWo5ivbEVyMh9ktzJ0CK8wh4HP NjYBp1d6D/YerL5l2UPweYJ6/gPsAzxValgyyF0/qCHxoVQa06K4cmrUyPCp5uGE +pblrwt/Co6EcQuyrsMKskkSH9RC6xgmQeSL9B1zkbc48vvkKGsUY3XxcQLyo/um CTkCmTzTE9oA7VNyIqM6DaT4b1l43MQMiRjc7Kdh7Qdob9PxILWOkvPUplZTstCN ACg2dNrpO1+lVJVqd6RexbXwUmyFOtposcS7htuRzOnmts7Xm7inXxxV5oB6RYTi INKIUM6U1IlsQMyrukuQSFsqw+0OrtL3EFqwhnsx4a/JSARKLwgrVAiE+M0vtL5e 9vvn+gslQU8hjR9DzG5MMw5NNT7evSHjzSbyyeONQL+TbTCe3ymY1qKBkyhKelTc OR2Ibsa3hHq87H+M8imYgrxbE4z8V2jnRSALgc+0FkptqeNp9lI= =KirA -----END PGP SIGNATURE----- --5156sOm2JBj5jbFq--