Re: [RFC] Should "SHOW huge_pages" display the effective value "off" when the huge page is unavailable?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [RFC] Should "SHOW huge_pages" display the effective value "off" when the huge page is unavailable?
Date: 2017-02-06 16:17:07
Message-ID: 27289.1486397827@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujii Masao <masao(dot)fujii(at)gmail(dot)com> writes:
> On Tue, Feb 7, 2017 at 12:36 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-02-06 16:17:44 Re: Draft release notes for next week's releases are up for review
Previous Message Pavel Stehule 2017-02-06 16:10:43 Re: IF (NOT) EXISTS in psql-completion