RE: Improve logging when using Huge Pages

From: "Shinoda, Noriyoshi (PN Japan FSIP)" <noriyoshi(dot)shinoda(at)hpe(dot)com>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Cc: "masao(dot)fujii(at)oss(dot)nttdata(dot)com" <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, "rjuju123(at)gmail(dot)com" <rjuju123(at)gmail(dot)com>, "tgl(at)sss(dot)pgh(dot)pa(dot)us" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "Justin Pryzby" <pryzby(at)telsasoft(dot)com>
Subject: RE: Improve logging when using Huge Pages
Date: 2021-10-27 06:39:46
Message-ID: TU4PR8401MB11529CCEE0FCC07EEE9F8FA7EE859@TU4PR8401MB1152.NAMPRD84.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)telsasoft(dot)com]
Sent: Friday, October 22, 2021 11:38 AM
To: Shinoda, Noriyoshi (PN Japan FSIP) <noriyoshi(dot)shinoda(at)hpe(dot)com>
Cc: masao(dot)fujii(at)oss(dot)nttdata(dot)com; pgsql-hackers(at)postgresql(dot)org; rjuju123(at)gmail(dot)com; tgl(at)sss(dot)pgh(dot)pa(dot)us; Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)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

Attachment Content-Type Size
huge_pages_log_v7.diff application/octet-stream 1.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shinya Kato 2021-10-27 06:54:03 Re: [PATCH] Added TRANSFORM FOR for COMMENT tab completion
Previous Message tanghy.fnst@fujitsu.com 2021-10-27 06:34:23 RE: Skipping logical replication transactions on subscriber side