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 1rDyMS-003jsv-SK for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Dec 2023 02:55:37 +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 1rDyMQ-00EXyr-C9 for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Dec 2023 02:55:34 +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 1rDyMP-00EXxJ-8X for pgsql-hackers@lists.postgresql.org; Fri, 15 Dec 2023 02:55:34 +0000 Received: from mail.clear-code.com ([153.126.206.245]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rDyMK-00C3ta-NO for pgsql-hackers@postgresql.org; Fri, 15 Dec 2023 02:55:32 +0000 Received: from localhost (unknown [IPv6:2404:7a80:89c1:1200:1653:202c:ea56:2daf]) by mail.clear-code.com (Postfix) with ESMTPSA id B75C86FE5A5; Fri, 15 Dec 2023 11:55:20 +0900 (JST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.clear-code.com B75C86FE5A5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clear-code.com; s=default; t=1702608920; bh=DBQgsFpDQUpSNuBjJVK4ldlvmfNU5CLhXDiavO2EP6c=; h=Date:To:Cc:Subject:From:In-Reply-To:References:From; b=NF7BAkUFrGz0lmpRVhGzhncvuUqf/YLHyYsE+lA8zHZpSS/IWIwNrtFXxAD23na1l a/U9LAJo4u4rQ41+bHmtSv125JR58prs7q5MbbdqweZjq4cKVVxLEuVT6/WtBUyPfw SSbjsPu+7eFUI8PXQ7+3uPXZWK7eqrSmd5KsrGx8= Date: Fri, 15 Dec 2023 11:55:18 +0900 (JST) Message-Id: <20231215.115518.402165846487638860.kou@clear-code.com> To: kuroda.hayato@fujitsu.com Cc: zhjwpku@gmail.com, andrew@dunslane.net, michael@paquier.xyz, sawada.mshk@gmail.com, nathandbossart@gmail.com, pgsql-hackers@postgresql.org Subject: Re: Make COPY format extendable: Extract COPY TO format implementations From: Sutou Kouhei In-Reply-To: References: <20231210.054407.1987293623700655053.kou@clear-code.com> X-Mailer: Mew version 6.8 on Emacs 29.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: B75C86FE5A5 X-Rspamd-Server: mail.clear-code.com X-Spamd-Result: default: False [2.90 / 999.00]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:2518, ipnet:2404:7a80::/29, country:JP]; TAGGED_RCPT(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_COUNT_ZERO(0.00)[0]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; URIBL_BLOCKED(0.00)[fujitsu.com:email,outlook.com:email,postgresql.org:url,localhost:helo]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,dunslane.net,paquier.xyz,postgresql.org]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; SURBL_MULTI_FAIL(0.00)[outlook.com:server fail,postgresql.org:server fail,localhost:server fail,fujitsu.com:server fail] X-Rspamd-Action: no action List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, In "RE: Make COPY format extendable: Extract COPY TO format implementations" on Tue, 12 Dec 2023 02:31:53 +0000, "Hayato Kuroda (Fujitsu)" wrote: >> Can we discuss how to proceed this improvement? >> >> There are 2 approaches for it: >> >> 1. Do the followings concurrently: >> a. Implementing small changes that got a consensus and >> merge them step-by-step >> (e.g. We got a consensus that we need to extract the >> current format related routines.) >> b. Discuss design >> >> (v1-v3 patches use this approach.) >> >> 2. Implement one (large) complete patch set with design >> discussion and merge it >> >> (v4- patches use this approach.) >> >> Which approach is preferred? (Or should we choose another >> approach?) >> >> I thought that 1. is preferred because it will reduce review >> cost. So I chose 1. > > I'm ok to use approach 1, but could you please divide a large patch? E.g., > > 0001. defines an infrastructure for copy-API > 0002. adjusts current codes to use APIs > 0003. adds a test module in src/test/modules or contrib. > ... > > This approach helps reviewers to see patches deeper. Separated patches can be > combined when they are close to committable. It seems that I should have chosen another approach based on comments so far: 3. Do the followings in order: a. Implement a workable (but maybe dirty and/or incomplete) implementation to discuss design like [1], discuss design with it and get a consensus on design b. Implement small patches based on the design [1]: https://www.postgresql.org/message-id/CAD21AoCunywHird3GaPzWe6s9JG1wzxj3Cr6vGN36DDheGjOjA%40mail.gmail.com I'll implement a custom COPY FORMAT handler with [1] and provide a feedback with the experience. (It's for a.) Thanks, -- kou