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 1pKnrv-0000vg-9N for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jan 2023 22:03:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pKnrt-0005t1-Vb for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jan 2023 22:03:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKnrt-0005rc-M3 for pgsql-hackers@lists.postgresql.org; Wed, 25 Jan 2023 22:03:45 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pKnrr-00007m-9q for pgsql-hackers@lists.postgresql.org; Wed, 25 Jan 2023 22:03:45 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 016E9320082A; Wed, 25 Jan 2023 17:03:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 25 Jan 2023 17:03:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1674684220; x=1674770620; bh=SG2hw/ObjM bwefQPXN57xOYEAVnn9MyFlArm8iWz4YA=; b=pRYbDUf/iNduSkAkXqBgnkXqyT JmDVVrk7MqswNDtXnC9Xrj0498kmV3hDSVPC0Um522ev8VGH01f1cuNMAXwuvAD2 d8pDhkeeXJktNPkkOoxCEwriD2gTldcriVw9h6IIglIwFmL2/Fk3ARTsVthGMlTE m0mn8sQz1BgqPq6SBoFqQXg8zC7wCNWsM3YuLfKBucXyRWHECwsh4UcudXxDCwBJ LNtzjnKkODBfZ6LvPqDjMTyIlZWUGTj6TspYAGKSJ5X3J4GOBk+dVS/XV4Jv81gP WriC4MVwE70PWs9Cy+ZDC+u8hNSh8UHs6curkcroTk/TA46K4UpXlD8KbKgw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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= fm3; t=1674684220; x=1674770620; bh=SG2hw/ObjMbwefQPXN57xOYEAVnn 9MyFlArm8iWz4YA=; b=sC7kWaJnnJ5gatG8FlJnEmKdEzlU46PNUpeyHKDkNyFM eMFqONhwk+G+UzwYj8Wo7t9WnbLnkCBh58kQNCF0O9vqnFwWtKeLXB9X02C+qLZB gfkmJpKN8KgEYkPE7IkHqIdN21WY+EEeKGSdZSIjuua07UzCFDLg0/NC2RD+12Av f14m8swh4a1xubqn+mgYMVJ+1XmCfZI2O9GEleZgGRBNyAXmtRpGa7G5+Hp50LIf xFOndbFZWgV+bH0OeR7n6eWgPrhDn/9fdTJmNgaoOx3hb++gEh54feuokcAVARnl VDSdEKPe3pOsgZYqiM5vNsJsIj7k8QG5XdsgSKz7vA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvvddgudehkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvfevuffkfhggtggujgesth dtredttddtvdenucfhrhhomheptehnughrvghsucfhrhgvuhhnugcuoegrnhgurhgvshes rghnrghrrgiivghlrdguvgeqnecuggftrfgrthhtvghrnhepvdfffeevhfetveffgeeite efhfdtvdffjeevhfeuteegleduheetveduieettddunecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdrug gv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Jan 2023 17:03:40 -0500 (EST) Date: Wed, 25 Jan 2023 14:03:39 -0800 From: Andres Freund To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Set arbitrary GUC options during initdb Message-ID: <20230125220339.vdukiow6rvbtr7a2@awork3.anarazel.de> References: <2844176.1674681919@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2844176.1674681919@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-01-25 16:25:19 -0500, Tom Lane wrote: > The attached patch responds to the discussion at [1] about how > we ought to offer a way to set any server GUC from the initdb > command line. Are you thinking of backpatching this, to offer the people affected by the issue in [1] a way out? > So this invents an initdb switch "-c NAME=VALUE" just like the > one that the server itself has long had. I still am +1 on the idea. I've actually wanted this for development purposes a couple times... > The specified settings are applied on the command line of the initial probe > calls (which happen before we've made any config files), and then they are > added to postgresql.auto.conf, which causes them to take effect for the > bootstrap backend runs as well as subsequent postmaster starts. I think this means that if you set e.g. max_connections as an initdb parameter, the probes won't do much. Probably fine? Perhaps worth memorializing the priority of the -c options in a test? E.g. setting shared_buffers = 20MB or so and then testing that that's the value when starting the server? > I also invented "--set NAME=VALUE", mainly because just about > every other initdb switch has a long form. The server itself > doesn't have that spelling, so I'm not wedded to that part. Fine with me, but also fine to leave out. Greetings, Andres Freund