Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gk9WD-0000kh-8n for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jan 2019 15:23:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gk9WC-0001oX-0T for pgsql-hackers@arkaria.postgresql.org; Thu, 17 Jan 2019 15:23:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gk9WB-0001gE-M5 for pgsql-hackers@lists.postgresql.org; Thu, 17 Jan 2019 15:23:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gk9W9-00010V-6T for pgsql-hackers@postgresql.org; Thu, 17 Jan 2019 15:23:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x0HFNd3B013282; Thu, 17 Jan 2019 10:23:39 -0500 From: Tom Lane To: Alvaro Herrera cc: Dmitry Dolgov <9erthalion6@gmail.com>, PostgreSQL-development Subject: Re: ArchiveEntry optional arguments refactoring In-reply-to: <201901171502.nh6krqterjdd@alvherre.pgsql> References: <201901171502.nh6krqterjdd@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 17 Jan 2019 12:02:16 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13280.1547738619.1@sss.pgh.pa.us> Date: Thu, 17 Jan 2019 10:23:39 -0500 Message-ID: <13281.1547738619@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2019-Jan-16, Dmitry Dolgov wrote: >> ArchiveEntry((ArchiveArgs){.tablespace = 3, >> .dumpFn = somefunc, >> ...}); > Is there real savings to be had by doing this? What would be the > arguments to each function? Off-hand, I'm not liking this idea too > much. I'm not either. What this looks like it will mainly do is create a back-patching barrier, with little if any readability improvement. I don't buy the argument that this would move the goalposts in terms of how much work it is to add a new argument. You'd still end up touching every call site. regards, tom lane