From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
Cc: | sfrost(at)snowman(dot)net, pryzby(at)telsasoft(dot)com, alvherre(at)alvh(dot)no-ip(dot)org, andres(at)anarazel(dot)de, nathandbossart(at)gmail(dot)com, jchampion(at)timescale(dot)com, john(dot)naylor(at)enterprisedb(dot)com, masao(dot)fujii(at)oss(dot)nttdata(dot)com, noriyoshi(dot)shinoda(at)hpe(dot)com, pgsql-hackers(at)postgresql(dot)org, rjuju123(at)gmail(dot)com, sawada(dot)mshk(at)gmail(dot)com, tgl(at)sss(dot)pgh(dot)pa(dot)us, thomas(dot)munro(at)gmail(dot)com |
Subject: | Re: Improve logging when using Huge Pages |
Date: | 2023-03-20 04:54:46 |
Message-ID: | ZBfnFs8hBIDUuaXA@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 14, 2023 at 02:02:19PM +0900, Kyotaro Horiguchi wrote:
> Regarding huge_page_active, its value remains constant throughout a
> postmaster's lifespan. In this regard, GUC may be a better fit for
> this information. The issue with using GUC for this value is that the
> postgres command cannot report the final value via the -C option,
> which may be the reason for the third alternative "unknown".
>
> I slightly prefer using a function for this, as if GUC is used, it can
> only return "unknown" for the command "postgres -C
> huge_page_active". However, apart from this advantage, I prefer using
> a GUC for this information.
The main advantage of a read-only GUC over a function is that users
would not need to start a postmaster to know if huge pages would be
active or not. This is the main reason why a GUC would be a better
fit, in my opinion, because it makes for a cheaper check, while still
allowing a SQL query to check the value of the GUC.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-03-20 05:03:13 | Re: Improve logging when using Huge Pages |
Previous Message | Amit Kapila | 2023-03-20 04:21:38 | Re: Initial Schema Sync for Logical Replication |