pg_backend_memory_contexts
pg_backend_memory_contexts¶
pg_backend_memory_contexts
视图显示当前会话后端服务线程的所有MemoryContext(内存上下文),每个MemoryContext显示一行。
pg_backend_memory_contexts
视图是内部系统函数pg_get_backend_memory_contexts
的封装。
所有用户均可访问本视图。
列 | 类型 | 描述 |
---|---|---|
name |
text | 名称 |
ident |
text | 标识信息 |
parent |
text | 父级MemoryContext的名称 |
level |
integer | 在MemoryContext树上到TopMemoryContext的层级 |
total_bytes |
bigint | 已分配的内存字节数 |
total_nblocks |
bigint | 已分配的内存block个数 |
free_bytes |
bigint | 已分配但未使用的内存字节数 |
free_chunks |
bigint | 已分配但未使用的内存chunk个数 |
used_bytes |
bigint | 已分配且已使用的内存字节数 |
Table 1.pg_catalog.pg_backend_memory_contexts