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 1peo4r-0001aj-4T for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Mar 2023 02:19:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1peo4p-00084x-Q2 for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Mar 2023 02:19:47 +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 1peo4p-00084o-CD for pgsql-hackers@lists.postgresql.org; Wed, 22 Mar 2023 02:19:47 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1peo4m-00054U-5j for pgsql-hackers@postgresql.org; Wed, 22 Mar 2023 02:19:46 +0000 Received: by mail-io1-xd2d.google.com with SMTP id k17so7861117iob.1 for ; Tue, 21 Mar 2023 19:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; t=1679451583; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=m0a+b3UJPDHpah6x3NXA2CB8XdDosFge2WOVvIBwhBY=; b=bW7XXDZBUm8Kl44jPP/RjIERuRbxp2/lm+gaNjy2LADWBsJTp8zIw9E9ysBN5i/qBx KauN50m0IlnY4tGpL+lWdoYpmpri6Kcl+N8EiVBnWG+kGZvNrSrMbaoEbKhg1jZ+y3+n lZz8g5zLktRi8ComS33nLh4g/TJYU+RjyV+3z2j4EpezgkNOH1MSpM5aU2RIMp3aebhf 6SCFKUaPKUWzyPAvy+UyK6HTfZlAHKO8LHRVGXn6WBr2ec8kFCVXGeLN5bpO64QZUvNx tJM9yZ0RKAqjPfvfRrHs4/+hsVfHM4BHxrC7Z1/O+4IFHJw8bntkCSUbi9qKOw9ld2K7 dtuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679451583; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=m0a+b3UJPDHpah6x3NXA2CB8XdDosFge2WOVvIBwhBY=; b=YJkCuCoNpmUjwsk8n5FTRdkGvQHmDWxOUczoe+XIcPh2jNjnAzRZtUyIkrwrtj6gSC iGO+ij+dVAv2SiPPwPPclEGZRmeZPearM3+2kad52FMCeUVElPKRKgEMndPQPoqPcbdl bB+u+EzAZjB0YU+rPQEIIssS3T/5Gz18YjdJhTpo+H5FJlqLfJtqB5LrBRAkXw03sdpg VfDCNn2gMC/6bYInmJLtnuyehixhAFC3rQVT0fxX4MJR20G4TzSs0ntK2zjVfxO+53PI x0H7QXWRnHeIbJIsKjy6NisiDmYSZIjD+ICoS7Yhu3/gvgdVqrrR5HfkyYRJb2frGKle D7+A== X-Gm-Message-State: AO0yUKWJE41Hh9Z9xxHYcIG9UeuFe/I21rzKuO+buWon4tzKguuOMOu+ BLKBuzhLzIofT1fynte00kmO8w== X-Google-Smtp-Source: AK7set9tpNfpiovnhWGc82PnizyVV87qDtVuwDHxZNokIIhNesiQgcbXq1H3EQClqWXRxfhXwOHDKg== X-Received: by 2002:a6b:4f0b:0:b0:752:e9e5:49af with SMTP id d11-20020a6b4f0b000000b00752e9e549afmr3708761iob.2.1679451583437; Tue, 21 Mar 2023 19:19:43 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id m36-20020a056638272400b004063e6fb351sm4487842jav.89.2023.03.21.19.19.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 19:19:42 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id B75A28008DE; Tue, 21 Mar 2023 21:19:41 -0500 (CDT) Date: Tue, 21 Mar 2023 21:19:41 -0500 From: Justin Pryzby To: Michael Paquier Cc: Kyotaro Horiguchi , sfrost@snowman.net, alvherre@alvh.no-ip.org, andres@anarazel.de, nathandbossart@gmail.com, jchampion@timescale.com, john.naylor@enterprisedb.com, masao.fujii@oss.nttdata.com, noriyoshi.shinoda@hpe.com, pgsql-hackers@postgresql.org, rjuju123@gmail.com, sawada.mshk@gmail.com, tgl@sss.pgh.pa.us, thomas.munro@gmail.com Subject: Re: Improve logging when using Huge Pages Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Mar 20, 2023 at 02:03:13PM +0900, Michael Paquier wrote: > On Mon, Mar 20, 2023 at 01:54:46PM +0900, Michael Paquier wrote: > > The main advantage of a read-only GUC over a function is that users > > would not need to start a postmaster to know if huge pages would be > > active or not. This is the main reason why a GUC would be a better > > fit, in my opinion, because it makes for a cheaper check, while still > > allowing a SQL query to check the value of the GUC. > > [ Should have read more carefully ] > > .. Which is something you cannot do with -C because mmap() happens > after the runtime-computed logic for postgres -C. It does not sound > right to do the mmap() for a GUC check, so indeed a function may be > more adapted rather than move mmap() call a bit earlier in the > postmaster startup sequence. On Mon, Mar 20, 2023 at 02:17:33PM +0900, Michael Paquier wrote: > On Mon, Mar 20, 2023 at 01:09:09AM -0400, Tom Lane wrote: > > I'm confused here, because Horiguchi-san is saying that that > > won't work. I've not checked the code lately, but I think that > > "postgres -C var" prints its results before actually attempting > > to establish shared memory, so I suspect Horiguchi-san is right. > > Yes, I haven't read correctly through. Sorry for the noise. You set this patch to "waiting on author" twice. Would you let me know what I could do to help progress the patch? Right now, I have no idea. Most recently, you said it'd be better implemented as a GUC to allow using -C, but then recanted because -C doesn't work for this (which is why I implemented it as a string back on 2023-02-08). Which is why I reset its status on 2023-03-20. 2023-03-22 01:36:58 Michael Paquier (michael-kun) New status: Waiting on Author 2023-03-20 13:05:32 Justin Pryzby (justinpryzby) New status: Needs review 2023-03-20 05:03:53 Michael Paquier (michael-kun) New status: Waiting on Author -- Justin