Re: [HACKERS] [RFC] Should "SHOW huge_pages" display the effective value "off" when the huge page is unavailable? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [RFC] Should "SHOW huge_pages" display the effective value "off" when the huge page is unavailable?
Date
Msg-id 27289.1486397827@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [RFC] Should "SHOW huge_pages" display the effectivevalue "off" when the huge page is unavailable?  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Fujii Masao <masao.fujii@gmail.com> writes:
> On Tue, Feb 7, 2017 at 12:36 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> If the proposal is to have SHOW report something other than the setting
>> of the variable, that's not a great plan either.  It's generally important
>> that the output of SHOW be something that's acceptable to SET, as not
>> having that equivalence will break assorted client-side code.

> I was thinking that Tunakawa-san's proposal is this, i.e., use GUC show-hook
> to show "off" if the server fails to use huge-page and "on" otherwise.

Well, then you wouldn't know whether the true setting was "try" or not,
which is important information because of the crash/restart possibility.
If we went this direction, I think the SHOW output would have to read
something like "try (off)" or "try (on)", which is why I was concerned
about it not being acceptable SET input.

>> I think this desire would be better addressed by some kind of specialized
>> inquiry function, which would also be able to return more information than
>> just a naked "on/off" bit.  People might for instance wish to know what
>> hugepage size is in use.

> +1

But it's moot anyway if we're agreed that a separate function is better.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [HACKERS] IF (NOT) EXISTS in psql-completion
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Draft release notes for next week's releases are up for review