GS_THREAD_MEMORY_CONTEXT
GS_THREAD_MEMORY_CONTEXT displays statistics about memory usage of all threads based on MemoryContext nodes. This view is equivalent to the GS_SESSION_MEMORY_DETAIL view when enable_thread_pool is set to off. If the GUC parameter enable_memory_limit is set to off, this view is unavailable.
The memory context TempSmallContextGroup collects information about all memory contexts whose value in the totalsize column is less than 8192 bytes in the current thread, and the number of the collected memory contexts is recorded in the usedsize column. Therefore, the totalsize and freesize columns for TempSmallContextGroup in the view display the corresponding information about all the memory contexts whose value in the totalsize column is less than 8192 bytes in the current thread, and the usedsize column displays the number of these memory contexts.
Table 1 GS_THREAD_MEMORY_CONTEXT columns