pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Seino Yuki <seinoyu@oss.nttdata.com>
To: pgsql-hackers@postgresql.org
Subject: Doc: shared_memory_size_in_huge_pages with the "SHOW" command.
Date: Fri, 11 Oct 2024 17:25:04 +0900
Message-ID: <420584fd274f9ec4f337da55ffb3b790@oss.nttdata.com> (raw)

Hello,

Add a reference method for shared_memory_size_in_huge_pages
with the "SHOW" command.

The current documentation explains the use of the postgres -C command,
but this method may be limited in DBaaS or managed service environments.
In particular, CloudNativePG does not allow the server to be stopped,
making the execution of $ postgres -C impossible.

Alternatively, the "SHOW" command can be used, though the documentation 
states,
"Note that the server must be shut down to view this runtime-computed 
parameter.[1]"
This wording could be misunderstood to imply that the parameter cannot 
be accessed
while the server is running.

[1] - 
https://www.postgresql.org/docs/devel/kernel-resources.html#LINUX-HUGE-PAGES

Regards,
--
Yuki Seino
NTT DATA CORPORATION

Attachments:

v1-0001-shared_memory_size_in_huge_pages_using_show.patch (text/x-diff, 809B) download diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml index 2c4d5ef640..aaac025c90 100644 --- a/doc/src/sgml/runtime.sgml +++ b/doc/src/sgml/runtime.sgml @@ -1441,6 +1441,17 @@ $ <userinput>grep ^Hugepagesize /proc/meminfo</userinput> Hugepagesize: 2048 kB $ <userinput>ls /sys/kernel/mm/hugepages</userinput> hugepages-1048576kB hugepages-2048kB +</programlisting> + + If the server is running, this parameter can be viewed using the + <command>SHOW</command> command. + This might look like: +<programlisting> +postgres=# <userinput>SHOW shared_memory_size_in_huge_pages;</userinput> + shared_memory_size_in_huge_pages +---------------------------------- + 3170 +(1 row) </programlisting> In this example the default is 2MB, but you can also explicitly request

view thread (12+ messages)  latest in thread

Message-ID: <420584fd274f9ec4f337da55ffb3b790@oss.nttdata.com>
Permalink:  ../420584fd274f9ec4f337da55ffb3b790@oss.nttdata.com/
Also on:    postgresql.org/message-id/420584fd274f9ec4f337da55ffb3b790@oss.nttdata.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: seinoyu@oss.nttdata.com
  Subject: Re: Doc: shared_memory_size_in_huge_pages with the "SHOW" command.
  In-Reply-To: <420584fd274f9ec4f337da55ffb3b790@oss.nttdata.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox