1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-21 05:21:08 +03:00

Add pg_shmem_allocations view.

This tells you about allocations that have been made from the main
shared memory segment. The original patch also tried to show information
about dynamic shared memory allocation as well, but I decided to
leave that problem for another time.

Andres Freund and Robert Haas, reviewed by Michael Paquier, Marti
Raudsepp, Tom Lane, Álvaro Herrera, and Kyotaro Horiguchi.

Discussion: http://postgr.es/m/20140504114417.GM12715@awork2.anarazel.de
This commit is contained in:
Robert Haas
2020-01-09 10:59:07 -05:00
parent 5acf6d8bb4
commit ed10f32e37
7 changed files with 212 additions and 4 deletions

View File

@@ -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;
/*