Updated on 2025-10-10 GMT+08:00

GS_LSC_MEMORY_DETAIL

The GS_LSC_MEMORY_DETAIL view displays the SysCache memory usage of each thread on the current node. This view is supported only by clusters of version 9.1.1.100 or later.

Column

Type

Description

sessid

text

Thread start time and ID

thread_name

text

Thread name

context_name

text

MemoryContext name

totalsize

bigint

Total memory allocated by the OS

usedsize

bigint

Used memory

Example

Query the current view to collect statistics on the SysCache memory usage of each thread.

1
2
3
4
5
6
7
SELECT * FROM GS_LSC_MEMORY_DETAIL;
                 sessid                  |   thread_name    |      context_name      | totalsize | usedsize
-----------------------------------------+------------------+------------------------+-----------+----------
 1744684969.139761390696120.coordinator1 | postgres         | PartCacheMemoryContext |     24576 |      128
 1744684969.139761390696120.coordinator1 | postgres         | RelCacheMemoryContext  |    516096 |      384
 1744684969.139761390696120.coordinator1 | postgres         | SysCacheMemoryContext  |    516096 |     6000
(3 rows)