Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pesDw-0006WV-KV for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Mar 2023 06:45:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pesDv-0001PK-K1 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Mar 2023 06:45:27 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pesDv-0001PB-A6 for pgsql-hackers@lists.postgresql.org; Wed, 22 Mar 2023 06:45:27 +0000 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pesDs-0007VQ-Cw for pgsql-hackers@lists.postgresql.org; Wed, 22 Mar 2023 06:45:26 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailnew.west.internal (Postfix) with ESMTP id 7B1912B06737; Wed, 22 Mar 2023 02:45:22 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 22 Mar 2023 02:45:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1679467522; x=1679474722; bh=NT1asH2vdgRXndXn1idQ754uLWQfvglD4LK hmvZLc9c=; b=MA8riZxjNt+l81L+J72gJ0QTYDykYfwkOvPzKJbpNJhRikZkZDl zoPCa9yKt+8tDlyKTBOXcfx2nCrcT+g3UgJ2eV6EZ2QursXyM3fM+P4qRwJ+HhRc xP5wKHEi2MEhELbyH61wcTQFdIeQYE//Czcp7lp3xYYMDHQcMV5IVvLMYRKKSzko bPNjX9gtu2JvhC4Do0QpwsTTFnfPaQhmUAiSBEihAJk8p3O67bp99u8OayIUWV5h h/sENfwLNp4BxBT9pw/V90cozc/5qG5m6E73iRzyB4PdrDP0KY/n4MWO+imIe6KO QfmdOKmGNTs2DPEMLPQrRSolv1HEA5m1XjQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeguddguddtvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnh htvghrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeet iefhleetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgr uhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Mar 2023 02:45:20 -0400 (EDT) Message-ID: <475c3dff-158d-effa-5a0f-d025d37a3eac@enterprisedb.com> Date: Wed, 22 Mar 2023 07:45:18 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: Set arbitrary GUC options during initdb Content-Language: en-US To: Tom Lane , Robert Haas Cc: "David G. Johnston" , pgsql-hackers@lists.postgresql.org References: <2844176.1674681919@sss.pgh.pa.us> <8a8fda29-5a68-ba68-a2ff-8d17602b3762@enterprisedb.com> <3331317.1674833645@sss.pgh.pa.us> <3332912.1674834822@sss.pgh.pa.us> <3337560.1674837348@sss.pgh.pa.us> <3527270.1674849724@sss.pgh.pa.us> From: Peter Eisentraut In-Reply-To: <3527270.1674849724@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 27.01.23 21:02, Tom Lane wrote: > I wrote: >>>> Anyway, it seems like I gotta work harder. I'll produce a >>>> new patch. > > The string-hacking was fully as tedious as I expected. However, the > output looks pretty nice, and this does have the advantage that the > pre-programmed substitutions become a lot more robust: they are no > longer dependent on the initdb code exactly matching what is in > postgresql.conf.sample. This patch looks good to me. It's a very nice simplification of the initdb.c code, even without the new feature. I found that the addition of #include didn't appear to be necessary. Maybe it was required before guc_value_requires_quotes() was changed? I would remove the #if DEF_PGPORT != 5432 This was in the previous code too, but now if we remove it, then we don't have any more hardcoded 5432 left, which seems like a nice improvement in cleanliness.