aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorNathan Bossart <nathan@postgresql.org>2025-07-09 09:17:56 -0500
committerNathan Bossart <nathan@postgresql.org>2025-07-09 09:17:56 -0500
commit167ed8082f40ee1f3f4cd18cf02bd6d17df57dab (patch)
treeb2e1c2ab3e8b8eb6fedd68306716d752378c5c0a /doc/src
parentf5a987c0e5f6bbf0cc0420228dc57e7aae4d7e8f (diff)
downloadpostgresql-167ed8082f40ee1f3f4cd18cf02bd6d17df57dab.tar.gz
postgresql-167ed8082f40ee1f3f4cd18cf02bd6d17df57dab.zip
Introduce pg_dsm_registry_allocations view.
This commit adds a new system view that provides information about entries in the dynamic shared memory (DSM) registry. Specifically, it returns the name, type, and size of each entry. Note that since we cannot discover the size of dynamic shared memory areas (DSAs) and hash tables backed by DSAs (dshashes) without first attaching to them, the size column is left as NULL for those. Bumps catversion. Author: Florents Tselai <florents.tselai@gmail.com> Reviewed-by: Sungwoo Chang <swchangdev@gmail.com> Discussion: https://postgr.es/m/4D445D3E-81C5-4135-95BB-D414204A0AB4%40gmail.com
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/system-views.sgml74
1 files changed, 74 insertions, 0 deletions
diff --git a/doc/src/sgml/system-views.sgml b/doc/src/sgml/system-views.sgml
index e1ac544ee40..d3ff8c35738 100644
--- a/doc/src/sgml/system-views.sgml
+++ b/doc/src/sgml/system-views.sgml
@@ -82,6 +82,11 @@
</row>
<row>
+ <entry><link linkend="view-pg-dsm-registry-allocations"><structname>pg_dsm_registry_allocations</structname></link></entry>
+ <entry>shared memory allocations tracked in the DSM registry</entry>
+ </row>
+
+ <row>
<entry><link linkend="view-pg-file-settings"><structname>pg_file_settings</structname></link></entry>
<entry>summary of configuration file contents</entry>
</row>
@@ -1086,6 +1091,75 @@ AND c1.path[c2.level] = c2.path[c2.level];
</sect1>
+ <sect1 id="view-pg-dsm-registry-allocations">
+ <title><structname>pg_dsm_registry_allocations</structname></title>
+
+ <indexterm zone="view-pg-dsm-registry-allocations">
+ <primary>pg_dsm_registry_allocations</primary>
+ </indexterm>
+
+ <para>
+ The <structname>pg_dsm_registry_allocations</structname> view shows shared
+ memory allocations tracked in the dynamic shared memory (DSM) registry.
+ This includes memory allocated by extensions using the mechanisms detailed
+ in <xref linkend="xfunc-shared-addin-after-startup" />.
+ </para>
+
+ <table>
+ <title><structname>pg_dsm_registry_allocations</structname> Columns</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ Column Type
+ </para>
+ <para>
+ Description
+ </para></entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>name</structfield> <type>text</type>
+ </para>
+ <para>
+ The name of the allocation in the DSM registry.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>type</structfield> <type>text</type>
+ </para>
+ <para>
+ The type of allocation. Possible values are <literal>segment</literal>,
+ <literal>area</literal>, and <literal>hash</literal>, which correspond
+ to dynamic shared memory segments, areas, and hash tables, respectively.
+ </para></entry>
+ </row>
+
+ <row>
+ <entry role="catalog_table_entry"><para role="column_definition">
+ <structfield>size</structfield> <type>int8</type>
+ </para>
+ <para>
+ Size of the allocation in bytes. NULL for entries of type
+ <literal>area</literal> and <literal>hash</literal>.
+ </para></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>
+ By default, the <structname>pg_dsm_registry_allocations</structname> view
+ can be read only by superusers or roles with privileges of the
+ <literal>pg_read_all_stats</literal> role.
+ </para>
+ </sect1>
+
<sect1 id="view-pg-file-settings">
<title><structname>pg_file_settings</structname></title>