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 1s815l-008yeG-Ki for pgsql-hackers@arkaria.postgresql.org; Fri, 17 May 2024 17:10:03 +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 1s815l-00FfZS-O3 for pgsql-hackers@arkaria.postgresql.org; Fri, 17 May 2024 17:10:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s815l-00FfZK-F0 for pgsql-hackers@lists.postgresql.org; Fri, 17 May 2024 17:10:01 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s815j-000gyq-7X for pgsql-hackers@postgresql.org; Fri, 17 May 2024 17:10:00 +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 44HH9tGq2463907; Fri, 17 May 2024 13:09:55 -0400 From: Tom Lane To: Nathan Bossart cc: "Imseih (AWS), Sami" , Justin Pryzby , "pgsql-hackers@postgresql.org" Subject: Re: problems with "Shared Memory and Semaphores" section of docs In-reply-to: <20240517164452.GA1914161@nathanxps13> References: <20240517164452.GA1914161@nathanxps13> Comments: In-reply-to Nathan Bossart message dated "Fri, 17 May 2024 11:44:52 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2463905.1715965795.1@sss.pgh.pa.us> Date: Fri, 17 May 2024 13:09:55 -0400 Message-ID: <2463906.1715965795@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > [ many, many problems in documented formulas ] > At a bare minimum, we should probably fix the obvious problems, but I > wonder if we could simplify this section a bit, too. Yup. "The definition of insanity is doing the same thing over and over and expecting different results." Time to give up on documenting these things in such detail. Anybody who really wants to know can look at the source code. > If the exact values > are important, maybe we could introduce more GUCs like > shared_memory_size_in_huge_pages that can be consulted (instead of > requiring users to break out their calculators). I don't especially like shared_memory_size_in_huge_pages, and I don't want to introduce more of those. GUCs are not the right way to expose values that you can't actually set. (Yeah, I'm guilty of some of the existing ones like that, but it's still not a good thing.) Maybe it's time to introduce a system view for such things? It could be really simple, with name and value, or we could try to steal some additional ideas such as units from pg_settings. regards, tom lane