Postgresql 中文操作指南
54.4. pg_backend_memory_contexts #
视图 pg_backend_memory_contexts 显示附加到当前会话的服务器进程的所有内存上下文。
The view pg_backend_memory_contexts displays all the memory contexts of the server process attached to the current session.
pg_backend_memory_contexts 包含每种内存语境的一行。
pg_backend_memory_contexts contains one row for each memory context.
Table 54.4. pg_backend_memory_contexts Columns
Table 54.4. pg_backend_memory_contexts Columns
Column Type Description |
name text Name of the memory context |
ident text Identification information of the memory context. This field is truncated at 1024 bytes |
parent text Name of the parent of this memory context |
level int4 Distance from TopMemoryContext in context tree |
total_bytes int8 Total bytes allocated for this memory context |
total_nblocks int8 Total number of blocks allocated for this memory context |
free_bytes int8 Free space in bytes |
free_chunks int8 Total number of free chunks |
used_bytes int8 Used space in bytes |
默认情况下,只有超级用户或具有 pg_read_all_stats 角色的权限的角色才能读取 pg_backend_memory_contexts 视图。
By default, the pg_backend_memory_contexts view can be read only by superusers or roles with the privileges of the pg_read_all_stats role.