RE: Improve logging when using Huge Pages

Shinoda, Noriyoshi <noriyoshi.shinoda@hpe.com>

From: "Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi.shinoda@hpe.com>
To: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Cc: "masao.fujii@oss.nttdata.com" <masao.fujii@oss.nttdata.com>, "rjuju123@gmail.com" <rjuju123@gmail.com>, "tgl@sss.pgh.pa.us" <tgl@sss.pgh.pa.us>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, "Justin Pryzby" <pryzby@telsasoft.com>
Date: 2021-10-27T06:39:46Z
Lists: pgsql-hackers

Attachments

Hi,
Thank you for your comment.
The attached patch stops message splitting.
This patch also limits the timing of message output when huge_pages = try and HugePages is not used.

Regards,
Noriyoshi Shinoda

-----Original Message-----
From: Justin Pryzby [mailto:pryzby@telsasoft.com] 
Sent: Friday, October 22, 2021 11:38 AM
To: Shinoda, Noriyoshi (PN Japan FSIP) <noriyoshi.shinoda@hpe.com>
Cc: masao.fujii@oss.nttdata.com; pgsql-hackers@postgresql.org; rjuju123@gmail.com; tgl@sss.pgh.pa.us; Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Subject: Re: Improve logging when using Huge Pages

+               ereport(LOG, (errmsg("Anonymous shared memory was 
+ allocated %s huge pages.", with_hugepages ? "with" : "without")));

You shouldn't break a sentence into pieces like this, since it breaks translation.  You don't want an untranslated "without" to appear in the middle of the translated message.

There are cases where a component *shouldn't* be translated, like this one:
where "numeric" should not be translated.

src/backend/utils/adt/numeric.c:                                         errmsg("invalid input syntax for type %s: \"%s\"",
src/backend/utils/adt/numeric.c-                                                        "numeric", str)));

--
Justin

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add GUC parameter "huge_pages_status"

  2. Add check on initial and boot values when loading GUCs

  3. Clean up some inconsistencies with GUC declarations

  4. Clean up some GUC declarations and comments