mirror of https://github.com/postgres/postgres
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.compull/235/head
parent
f5a987c0e5
commit
167ed8082f
@ -1,6 +1,13 @@ |
||||
SELECT name, type, size IS DISTINCT FROM 0 AS size |
||||
FROM pg_dsm_registry_allocations |
||||
WHERE name like 'test_dsm_registry%' ORDER BY name; |
||||
CREATE EXTENSION test_dsm_registry; |
||||
SELECT set_val_in_shmem(1236); |
||||
SELECT set_val_in_hash('test', '1414'); |
||||
\c |
||||
SELECT get_val_in_shmem(); |
||||
SELECT get_val_in_hash('test'); |
||||
\c |
||||
SELECT name, type, size IS DISTINCT FROM 0 AS size |
||||
FROM pg_dsm_registry_allocations |
||||
WHERE name like 'test_dsm_registry%' ORDER BY name; |
||||
|
||||
Loading…
Reference in new issue