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 1pK7RK-00060T-5p for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Jan 2023 00:45:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pK7RI-0008C3-AU for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Jan 2023 00:45:28 +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 1pK7RI-0008Bm-2G for pgsql-bugs@lists.postgresql.org; Tue, 24 Jan 2023 00:45:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pK7RE-000894-Mk for pgsql-bugs@lists.postgresql.org; Tue, 24 Jan 2023 00:45:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 30O0jJif2151515; Mon, 23 Jan 2023 19:45:19 -0500 From: Tom Lane To: Andres Freund cc: "Sisson, David" , Tomas Vondra , "pgsql-bugs@lists.postgresql.org" Subject: Re: BUG #17757: Not honoring huge_pages setting during initdb causes DB crash in Kubernetes In-reply-to: <20230124003737.owezrb6ffen6dhb3@awork3.anarazel.de> References: <17757-dbdfc1f1c954a6db@postgresql.org> <4ce40288-5b88-f9fb-ea11-fc932c61472b@enterprisedb.com> <1113115.1674343827@sss.pgh.pa.us> <127328f2-4e01-e9ec-c9b1-76aef967343f@enterprisedb.com> <20230122020826.x6geac6qjiinr66a@awork3.anarazel.de> <20230123195504.uvlcd3aytn3jg744@awork3.anarazel.de> <2139743.1674514306@sss.pgh.pa.us> <20230124003737.owezrb6ffen6dhb3@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 23 Jan 2023 16:37:37 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2151513.1674521119.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 23 Jan 2023 19:45:19 -0500 Message-ID: <2151514.1674521119@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > On 2023-01-23 17:51:46 -0500, Tom Lane wrote: >> Yeah, I think that has enough other potential applications to be worth >> doing. Here's a quick draft patch (sans user-facing docs as yet). >> It injects any given values into postgresql.auto.conf, not >> postgresql.conf proper. I did that mainly because the latter looked >> beyond the abilities of the primitive string-munging code we have in >> there, but I think it can be argued to be a reasonable choice anyway. > Oh, I had thought we'd just pass them on with -c to the processes that i= nitdb > starts. But perhaps just persisting them isn't a bad idea... It certainly seems to me that that would be the mainstream use-case, so why not fill in the file as the user probably wants? They can always change it. Also, as I mentioned, the expectation is that initdb will set up a known-working combination of settings; and we don't really know that if we leave off whatever was injected by "-c". In the case at hand, if we don't propagate "huge_pages =3D off" to the installed configuration, the server still won't work. regards, tom lane