summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorNathan Bossart2025-07-09 14:17:56 +0000
committerNathan Bossart2025-07-09 14:17:56 +0000
commit167ed8082f40ee1f3f4cd18cf02bd6d17df57dab (patch)
treeb2e1c2ab3e8b8eb6fedd68306716d752378c5c0a /src/include
parentf5a987c0e5f6bbf0cc0420228dc57e7aae4d7e8f (diff)
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 'src/include')
-rw-r--r--src/include/catalog/catversion.h2
-rw-r--r--src/include/catalog/pg_proc.dat8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h
index ff9ffd9d474..a3f3315fed9 100644
--- a/src/include/catalog/catversion.h
+++ b/src/include/catalog/catversion.h
@@ -57,6 +57,6 @@
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 202506301
+#define CATALOG_VERSION_NO 202507091
#endif
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index d4650947c63..1fc19146f46 100644
--- a/src/include/catalog/pg_proc.dat
+++ b/src/include/catalog/pg_proc.dat
@@ -8572,6 +8572,14 @@
proargnames => '{name,numa_node,size}',
prosrc => 'pg_get_shmem_allocations_numa' },
+{ oid => '9314',
+ descr => 'shared memory allocations tracked in the DSM registry',
+ proname => 'pg_get_dsm_registry_allocations', prorows => '50',
+ proretset => 't', provolatile => 'v', prorettype => 'record',
+ proargtypes => '', proallargtypes => '{text,text,int8}',
+ proargmodes => '{o,o,o}', proargnames => '{name,type,size}',
+ prosrc => 'pg_get_dsm_registry_allocations' },
+
# memory context of local backend
{ oid => '2282',
descr => 'information about all memory contexts of local backend',