Skip to content

Commit bbd4951

Browse files
committed
doc: Improve postgres command for shared_memory_size_in_huge_pages
The command used in the documentation to retrieve the value of the runtime-computed GUC shared_memory_size_in_huge_pages would also show to the user all the log messages generated by the postmaster before and after printing the wanted value. This can be confusing, as the wanted result could be masked with a lot of noise. One way to avoid those log messages is to use something like "-c log_min_messages=fatal" in the command (my idea, but that's not common knowledge). Rather than mentioning this option, suffix the command with a redirection of stderr to /dev/null, which is the stream location where the logs show up. This is enough to show only the GUC value to the user when copy-pasting the command. Reported-by: Magnus Hagander Author: Nathan Bossart Discussion: https://postgr.es/m/20220314173417.GA1020555@nathanxps13
1 parent 127aea2 commit bbd4951

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/src/sgml/runtime.sgml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ export PG_OOM_ADJUST_VALUE=0
14481448
server must be shut down to view this runtime-computed parameter.
14491449
This might look like:
14501450
<programlisting>
1451-
$ <userinput>postgres -D $PGDATA -C shared_memory_size_in_huge_pages</userinput>
1451+
$ <userinput>postgres -D $PGDATA -C shared_memory_size_in_huge_pages 2> /dev/null</userinput>
14521452
3170
14531453
$ <userinput>grep ^Hugepagesize /proc/meminfo</userinput>
14541454
Hugepagesize: 2048 kB

0 commit comments

Comments
 (0)