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 1rQRD4-001GPN-4L for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jan 2024 12:09:26 +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 1rQRD2-002DbL-KP for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Jan 2024 12:09:24 +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 1rQRD2-002DbC-BX for pgsql-hackers@lists.postgresql.org; Thu, 18 Jan 2024 12:09:24 +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 1rQRCw-002STk-Ju for pgsql-hackers@postgresql.org; Thu, 18 Jan 2024 12:09:23 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTPA id 5A01A60A16; Thu, 18 Jan 2024 21:09:13 +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=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 18 Jan 2024 21:09:13 +0900 From: torikoshia To: Alexander Korotkov Cc: jian he , Masahiko Sawada , Tom Lane , Kyotaro Horiguchi , vignesh21@gmail.com, lena.ribackina@yandex.ru, dam.bel07@gmail.com, zhihuifan1213@163.com, daniel@yesql.se, pgsql-hackers@postgresql.org, andres@anarazel.de, anisimow.d@gmail.com, HukuToc@gmail.com, pgsql-hackers@lists.postgresql.org, a.lepikhov@postgrespro.ru Subject: Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features) In-Reply-To: References: <762d7dd4d5aa9e5ecffec2ae6a255a28@oss.nttdata.com> <20240117.164859.2242646601795501168.horikyota.ntt@gmail.com> <2070915.1705527477@sss.pgh.pa.us> <350926525700756634e7c7b003fb1694@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-01-18 16:59, Alexander Korotkov wrote: > On Thu, Jan 18, 2024 at 4:16 AM torikoshia > wrote: >> On 2024-01-18 10:10, jian he wrote: >> > On Thu, Jan 18, 2024 at 8:57 AM Masahiko Sawada >> > wrote: >> >> On Thu, Jan 18, 2024 at 6:38 AM Tom Lane wrote: >> >> > Kyotaro-san's suggestion isn't bad, though I might shorten it to >> >> > error_action {error|ignore|log} (or perhaps "stop" instead of "error")? >> >> > You will need a separate parameter anyway to specify the destination >> >> > of "log", unless "none" became an illegal table name when I wasn't >> >> > looking. I don't buy that one parameter that has some special values >> >> > while other values could be names will be a good design. Moreover, >> >> > what if we want to support (say) log-to-file along with log-to-table? >> >> > Trying to distinguish a file name from a table name without any other >> >> > context seems impossible. >> >> >> >> I've been thinking we can add more values to this option to log errors >> >> not only to the server logs but also to the error table (not sure >> >> details but I imagined an error table is created for each table on >> >> error), without an additional option for the destination name. The >> >> values would be like error_action {error|ignore|save-logs|save-table}. >> >> >> > >> > another idea: >> > on_error {error|ignore|other_future_option} >> > if not specified then by default ERROR. >> > You can also specify ERROR or IGNORE for now. >> > >> > I agree, the parameter "error_action" is better than "location". >> >> I'm not sure whether error_action or on_error is better, but either >> way >> "error_action error" and "on_error error" seems a bit odd to me. >> I feel "stop" is better for both cases as Tom suggested. > > OK. What about this? > on_error {stop|ignore|other_future_option} > where other_future_option might be compound like "file 'copy.log'" or > "table 'copy_log'". Thanks, also +1 from me. -- Regards, -- Atsushi Torikoshi NTT DATA Group Corporation