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 1pRmmV-0006WP-Bk for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Feb 2023 04:19:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pRmmS-0007RL-PE for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Feb 2023 04:19:00 +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 1pRmmS-0007RC-EL for pgsql-hackers@lists.postgresql.org; Tue, 14 Feb 2023 04:19:00 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pRmmP-0002da-Uo for pgsql-hackers@postgresql.org; Tue, 14 Feb 2023 04:19:00 +0000 Received: by mail-pl1-x634.google.com with SMTP id b5so15790231plz.5 for ; Mon, 13 Feb 2023 20:18:57 -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=Sb8H1rMyQAXnRCc5kKbs0rsmBL5jrsBhke8hHODzWUA=; b=WI8T3CXnr4seMVq0mwAvkCanwI3+ImB/ZlbK2PrZ+3AE31jBmY4v7Hs3IotCMDvRu4 DOwnHryqpsRIfUpRiUsNDYr5VJU6VUcUQPip3Lijq38bT5L1xHcAjxO3Xbq7xypnNWHb q/MlopCBg5La7I1mX7DgvJ2mHSXVTk6rH4yjt49RQcckfcSpdJ08QILdT4/BbPRHrghV O2lZpyA4XIysk4DO5BVFL/phzc1XHRgxR6dmhH2NMJ7gbNAmDOSDD/CKI4anfSMgYqnc /tuzFtWuhKukWa1JjAJypmmz5CJkFPL2fbcIbEQPdHS696t5hg4VsVtT6Xnq0RfWC5KK Gutw== 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=Sb8H1rMyQAXnRCc5kKbs0rsmBL5jrsBhke8hHODzWUA=; b=i/H8wAbAYfQ4ahfaAzbsQGUlLQ4fjvWb63qZd0k7y9E2eZmULFtu/V2GCMZVfnEZk0 kcKyobFQdFu8+D80W+OFZovGUorqhCQcF0rGUR6Mhmzaic0AoouORTaf34EB0auBVvmw 7TXZj93rePGvHqPYQXN/ME1701nTeibCLBitLyMk+KYSajwz9grhfwT2oSQkaNt3MlH5 qdBvm4rJCYd1oF3L1+GuxuAZojCi3EOi9xh14GbPQosq9S1rZ9uuE1V76TOepCJsVRj4 xSPDL5xYV+fqbwQO3ZfwuJ+DGF9jqNXyLQ3FycPB7KfFO0wgKf/ilgcuQEiP9/NI8V7Y tR+A== X-Gm-Message-State: AO0yUKWF32ml9TxAJ+5Uz6OJEfFeIa1hVdwbef2eLM+ZZBLvjaYl/0a+ yLDr7tUfmYbLYvSdp8AKWxU= X-Google-Smtp-Source: AK7set9xVVG8+RZZeIW8+FHyexaUWE6uHMga8FzJ0z0AKszTitkaNm1fn5tPkzXIy1ZDd+UqYnLk5w== X-Received: by 2002:a17:90b:388b:b0:233:e0d5:a2ab with SMTP id mu11-20020a17090b388b00b00233e0d5a2abmr854765pjb.34.1676348335462; Mon, 13 Feb 2023 20:18:55 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id s93-20020a17090a69e600b002339491ead6sm6776253pjj.5.2023.02.13.20.18.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 20:18:54 -0800 (PST) Date: Mon, 13 Feb 2023 20:18:52 -0800 From: Nathan Bossart To: Justin Pryzby Cc: Alvaro Herrera , 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: <20230214041852.GA1190218@nathanxps13> References: <20230208231803.GP1653@telsasoft.com> <20230209094013.67varf63bihops33@alvherre.pgsql> <20230209192909.GA606606@nathanxps13> <20230213232245.GI1653@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230213232245.GI1653@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Feb 13, 2023 at 05:22:45PM -0600, Justin Pryzby wrote: > + Reports whether huge pages are in use by the current process. > + See for more information. nitpick: Should this say "server" instead of "current process"? > +static char *huge_pages_active = "unknown"; /* dynamically set */ nitpick: Does this need to be initialized here? > + { > + {"huge_pages_active", PGC_INTERNAL, PRESET_OPTIONS, > + gettext_noop("Indicates whether huge pages are in use."), > + NULL, > + GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE | GUC_RUNTIME_COMPUTED > + }, > + &huge_pages_active, > + "unknown", > + NULL, NULL, NULL > + }, I'm curious why you chose to make this a string instead of an enum. There might be little practical difference, but since there are only three possible values, I wonder if it'd be better form to make it an enum. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com