Re: Improve logging when using Huge Pages - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: Improve logging when using Huge Pages
Date
Msg-id ZBplvQx7n0MGVr6O@telsasoft.com
Whole thread Raw
In response to Re: Improve logging when using Huge Pages  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Improve logging when using Huge Pages  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Mon, Mar 20, 2023 at 02:03:13PM +0900, Michael Paquier wrote:
> On Mon, Mar 20, 2023 at 01:54:46PM +0900, Michael Paquier wrote:
> > 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.
> 
> [ Should have read more carefully ]
> 
> ..  Which is something you cannot do with -C because mmap() happens
> after the runtime-computed logic for postgres -C.  It does not sound
> right to do the mmap() for a GUC check, so indeed a function may be
> more adapted rather than move mmap() call a bit earlier in the
> postmaster startup sequence.

On Mon, Mar 20, 2023 at 02:17:33PM +0900, Michael Paquier wrote:
> On Mon, Mar 20, 2023 at 01:09:09AM -0400, Tom Lane wrote:
> > I'm confused here, because Horiguchi-san is saying that that
> > won't work.  I've not checked the code lately, but I think that
> > "postgres -C var" prints its results before actually attempting
> > to establish shared memory, so I suspect Horiguchi-san is right.
> 
> Yes, I haven't read correctly through.  Sorry for the noise.

You set this patch to "waiting on author" twice.  Would you let me know
what I could do to help progress the patch?  Right now, I have no idea.

Most recently, you said it'd be better implemented as a GUC to allow
using -C, but then recanted because -C doesn't work for this (which is
why I implemented it as a string back on 2023-02-08).  Which is why I
reset its status on 2023-03-20.

2023-03-22 01:36:58     Michael Paquier (michael-kun)     New status: Waiting on Author
2023-03-20 13:05:32     Justin Pryzby (justinpryzby)     New status: Needs review
2023-03-20 05:03:53     Michael Paquier (michael-kun)     New status: Waiting on Author

-- 
Justin



pgsql-hackers by date:

Previous
From: "shiy.fnst@fujitsu.com"
Date:
Subject: RE: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry