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 1pPtMp-0007YA-6Q for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Feb 2023 22:56:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pPtMn-0007G3-TD for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Feb 2023 22:56:41 +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 1pPtMn-0007Fu-Hk for pgsql-hackers@lists.postgresql.org; Wed, 08 Feb 2023 22:56:41 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pPtMk-00035G-MX for pgsql-hackers@postgresql.org; Wed, 08 Feb 2023 22:56:40 +0000 Received: by mail-pl1-x634.google.com with SMTP id i2so778819ple.13 for ; Wed, 08 Feb 2023 14:56:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=IgiDhApviy19AMI1UePkC5N9GC+yPoxQOKhydz67TRg=; b=WnKguw9SLOIXSWc0nivuoxHaw1jOSVuQzV6D/jXtksHhfo3rCJGBRpdGud2Q7748vH Fr1B1SNhzI+OTzu8a3fXgv9PiRII9D5esnaZg6h0Y3kl2CH5QjMMK9D7KVVMmhTNYfqk sRTaNGtWm1dw/rCenPZyFs63gKBUNUrilpLzvYMTmwlhsGhoSFvhQPIKoyw48swbjeZe pD/h5h3EMY7dC44blqeTgRqGkNjsgSVsDGEi2tpqvXDqyZrm3Fk0plpribnUakOmEkep 1jp0pVxbFfXWu7sDyBbGQG+D5WrpF82H8z+6ha1GkaflIz/8xw8ty/Ei40qwckdCrhG+ alVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IgiDhApviy19AMI1UePkC5N9GC+yPoxQOKhydz67TRg=; b=kv/cdqcIQAqipVKpPy7VnozTcajeDl5SMsOfPvlK9z5wOglIFiXR/Kbo3avLApqbZ2 tQbviiJIZIanM0/nM2SccfgMeVYdGUfY7rAqXBgz8Hh9XDg5vb7zjOzkMjC0Yye39yvr sa4xplgRzK5Dbw2KknVPYYl5gNMy1VdBAodguJ9j13vNPLWB/nGmtmVJMect/Od6z0Kw V4gE69+q5Ud/HXog9TmUtM4zsQxdT00SDkaebffLVZ5I3lJst6PrXzoMKkx+V/HWwLLF 5uND0zdwocoPbD5xhNxb0nbkWf0YhdlL1Q/hXlY/GAMyalP30FFIOtoPQyDS1ybh0iVN Dpbw== X-Gm-Message-State: AO0yUKWaXs9FEwspWiTln1eMYRgyCXJzYR821tYYixlJv5CjYSF32YuT lv/mBuXvfgxPH1XKvrTHpWw= X-Google-Smtp-Source: AK7set+VkpwbpLH7Aho39Hs4ndHOiEzQAsPvI5jCC++gEEBxDbQbZJFRX+k2yVDhMzx5c4kgfHtCOw== X-Received: by 2002:a17:903:24f:b0:198:a08a:e52b with SMTP id j15-20020a170903024f00b00198a08ae52bmr10727476plh.13.1675896997389; Wed, 08 Feb 2023 14:56:37 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id ji13-20020a170903324d00b0019926c77577sm4982028plb.90.2023.02.08.14.56.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Feb 2023 14:56:36 -0800 (PST) Date: Wed, 8 Feb 2023 14:56:34 -0800 From: Nathan Bossart To: Alvaro Herrera Cc: Justin Pryzby , Andres Freund , Michael Paquier , Kyotaro Horiguchi , thomas.munro@gmail.com, tgl@sss.pgh.pa.us, john.naylor@enterprisedb.com, noriyoshi.shinoda@hpe.com, jchampion@timescale.com, sawada.mshk@gmail.com, masao.fujii@oss.nttdata.com, pgsql-hackers@postgresql.org, rjuju123@gmail.com Subject: Re: Improve logging when using Huge Pages Message-ID: <20230208225634.GA601969@nathanxps13> References: <20230125013728.GK13860@telsasoft.com> <20230202155337.gwsjcszhxhdgqmhs@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230202155337.gwsjcszhxhdgqmhs@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Feb 02, 2023 at 04:53:37PM +0100, Alvaro Herrera wrote: > Maybe I misread the code (actually I only read the patch), but -- does > it set active=true when huge_pages=on? I think the code only works when > huge_pages=try. That might be pretty confusing; I think it should say > "on" in both cases. +1 Also, while this is indeed a runtime-computed parameter, it won't be initialized until after 'postgres -C' has been handled, so 'postgres -C' will always report it as "off". However, I'm not sure it makes sense to check it with 'postgres -C' anyway since you want to know if the current server is using huge pages. At the moment, I think I'd vote for a new function instead of a GUC. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com