From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Michael Paquier <michael(at)paquier(dot)xyz>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, thomas(dot)munro(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, john(dot)naylor(at)enterprisedb(dot)com, noriyoshi(dot)shinoda(at)hpe(dot)com, jchampion(at)timescale(dot)com, sawada(dot)mshk(at)gmail(dot)com, masao(dot)fujii(at)oss(dot)nttdata(dot)com, pgsql-hackers(at)postgresql(dot)org, rjuju123(at)gmail(dot)com, Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Subject: | Re: Improve logging when using Huge Pages |
Date: | 2023-02-08 23:18:03 |
Message-ID: | 20230208231803.GP1653@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Feb 02, 2023 at 04:53:37PM +0100, Alvaro Herrera wrote:
> On 2023-Jan-24, Justin Pryzby wrote:
> > On Mon, Jan 23, 2023 at 05:33:35PM -0800, Andres Freund wrote:
> > > I'm ok with this being a GUC, it doesn't feel elegant, but I suspect there's
> > > no realistic elegant answer.
>
> > Whether it's a GUC or a function, I propose to name it hugepages_active.
> > If there's no objections, I'll add to the CF.
>
> 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.
Yes - I realized that too. There's no reason this GUC should be
inaccurate when huge_pages=on. (I had hoped there would be a conflict
needing resolution before anyone else noticed.)
I don't think it makes sense to run postgres -C huge_pages_active,
however, so I see no issue that that would always returns "false".
If need be, maybe the documentation could say "indicates whether huge
pages are active for the running server".
Does anybody else want to vote for a function rather than a
RUNTIME_COMPUTED GUC ?
--
Justin
Attachment | Content-Type | Size |
---|---|---|
v2-0001-add-GUC-huge_pages_active.patch | text/x-diff | 4.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Jones | 2023-02-08 23:42:20 | Re: [PATCH] Add pretty-printed XML output option |
Previous Message | Peter Smith | 2023-02-08 23:09:53 | Re: [PATCH] Add pretty-printed XML output option |