From: Nathan Bossart <nathandbossart@gmail.com>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Andres Freund <andres@anarazel.de>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: thomas.munro@gmail.com
Cc: tgl@sss.pgh.pa.us
Cc: john.naylor@enterprisedb.com
Cc: noriyoshi.shinoda@hpe.com
Cc: jchampion@timescale.com
Cc: sawada.mshk@gmail.com
Cc: masao.fujii@oss.nttdata.com
Cc: pgsql-hackers@postgresql.org
Cc: rjuju123@gmail.com
Subject: Re: Improve logging when using Huge Pages
Date: Mon, 13 Feb 2023 20:18:52 -0800
Message-ID: <20230214041852.GA1190218@nathanxps13> (raw)
In-Reply-To: <20230213232245.GI1653@telsasoft.com>
References: <20230208231803.GP1653@telsasoft.com>
<20230209094013.67varf63bihops33@alvherre.pgsql>
<20230209192909.GA606606@nathanxps13>
<20230213232245.GI1653@telsasoft.com>
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 <xref linkend="guc-huge-pages"/> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, pryzby@telsasoft.com, alvherre@alvh.no-ip.org, andres@anarazel.de, michael@paquier.xyz, horikyota.ntt@gmail.com, 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, rjuju123@gmail.com
Subject: Re: Improve logging when using Huge Pages
In-Reply-To: <20230214041852.GA1190218@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox