On Mon, Mar 14, 2022 at 04:26:43PM +0100, Magnus Hagander wrote:
> Nothing fixing this ended up actually getting committed, right? That
> is, we still get the extra log output?

Correct.

> And in fact, the command documented on
> https://www.postgresql.org/docs/devel/kernel-resources.html doesn't
> actually produce the output that the docs show, it also shows the log
> line, in the default config? If we can't fix the extra logging we
> should at least have our docs represent reality -- maybe by adding a
> "2>/dev/null" entry? But it'd be better to have it not output that log
> in the first place...

I attached a patch to adjust the documentation for now.  This apparently
crossed my mind earlier [0], but I didn't follow through with it for some
reason.

> (Of course what I'd really want is to be able to run it on a cluster
> that's running, but that was discussed downthread so I'm not bringing
> that one up for changes now)

I think it is worth revisiting the extra logging and the ability to view
runtime-computed GUCs on a running server.  Should this be an open item for
v15, or do you think it's alright to leave it for the v16 development
cycle?

[0] https://postgr.es/m/C45224E1-29C8-414C-A8E6-B718C07ACB94%40amazon.com

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
>From 7ee7b176c5280349631426ff047a9df394e26d59 Mon Sep 17 00:00:00 2001
From: Nathan Bossart <nathandboss...@gmail.com>
Date: Mon, 14 Mar 2022 10:24:48 -0700
Subject: [PATCH v1 1/1] send stderr to /dev/null in Linux Huge Pages
 documentation

---
 doc/src/sgml/runtime.sgml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index f77ed24204..85b3ffcd71 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -1448,7 +1448,7 @@ export PG_OOM_ADJUST_VALUE=0
     server must be shut down to view this runtime-computed parameter.
     This might look like:
 <programlisting>
-$ <userinput>postgres -D $PGDATA -C shared_memory_size_in_huge_pages</userinput>
+$ <userinput>postgres -D $PGDATA -C shared_memory_size_in_huge_pages 2> /dev/null</userinput>
 3170
 $ <userinput>grep ^Hugepagesize /proc/meminfo</userinput>
 Hugepagesize:       2048 kB
-- 
2.25.1

Reply via email to