Re: Improve logging when using Huge Pages
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, sfrost@snowman.net, alvherre@alvh.no-ip.org, andres@anarazel.de, nathandbossart@gmail.com, jchampion@timescale.com, john.naylor@enterprisedb.com, masao.fujii@oss.nttdata.com, noriyoshi.shinoda@hpe.com, pgsql-hackers@postgresql.org, rjuju123@gmail.com, sawada.mshk@gmail.com, tgl@sss.pgh.pa.us, thomas.munro@gmail.com
Date: 2023-03-22T02:19:41Z
Lists: 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
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add GUC parameter "huge_pages_status"
- a14354cac0e3 17.0 landed
-
Add check on initial and boot values when loading GUCs
- a73952b79563 16.0 cited
-
Clean up some inconsistencies with GUC declarations
- d9d873bac670 16.0 cited
-
Clean up some GUC declarations and comments
- 7d25958453a6 16.0 cited