summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/catalog/pg_proc.dat9
-rw-r--r--src/include/storage/shmem.h3
2 files changed, 11 insertions, 1 deletions
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index 59f1ff01ab8..427faa3c3b6 100644
--- a/src/include/catalog/pg_proc.dat
+++ b/src/include/catalog/pg_proc.dat
@@ -7663,6 +7663,15 @@
proparallel => 'r', prorettype => 'float8', proargtypes => '',
prosrc => 'pg_notification_queue_usage' },
+# shared memory usage
+{ oid => '8613',
+ descr => 'allocations from the main shared memory segment',
+ proname => 'pg_get_shmem_allocations', 'prorows' => 50, 'proretset' => 't',
+ provolatile => 'v', 'prorettype' => 'record', 'proargtypes' => '',
+ proallargtypes => '{text,int8,int8,int8}', proargmodes => '{o,o,o,o}',
+ proargnames => '{name,off,size,allocated_size}',
+ prosrc => 'pg_get_shmem_allocations' },
+
# non-persistent series generator
{ oid => '1066', descr => 'non-persistent series generator',
proname => 'generate_series', prorows => '1000',
diff --git a/src/include/storage/shmem.h b/src/include/storage/shmem.h
index 243b73f8bbd..0c1af892062 100644
--- a/src/include/storage/shmem.h
+++ b/src/include/storage/shmem.h
@@ -59,7 +59,8 @@ typedef struct
{
char key[SHMEM_INDEX_KEYSIZE]; /* string name */
void *location; /* location in shared mem */
- Size size; /* # bytes allocated for the structure */
+ Size size; /* # bytes requested for the structure */
+ Size allocated_size; /* # bytes actually allocated */
} ShmemIndexEnt;
/*