Updated on 2024-11-05 GMT+08:00

PGXC_MEMORY_DEBUG_INFO

PGXC_MEMORY_DEBUG_INFO provides a diagnostic view of memory-related errors across cluster nodes during job execution, facilitating fault locating. When 'memory is temporarily unavailable' is reported, this view allows querying node-specific memory error details, which are consistent with log records. This view is supported by cluster versions 8.3.0 and later.

This view presents the most recent error data for the cluster, with new errors overwriting previous ones. Should a query repeatedly encounter a memory allocation error, the displayed information remains static and does not refresh with each occurrence.

Table 1 PGXC_MEMORY_DEBUG_INFO columns

Column

Type

Description

node_name

text

Instance name, including CNs and DNs.

query_id

bigint

ID of the query that is applying for memory.

memory_info

text

Memory usage of the current instance, including:

  • process_used_memory: memory used by a GaussDB(DWS) process
  • max_dynamic_memory: maximum dynamic memory
  • dynamic_used_memory: used dynamic memory
  • dynamic_peak_memory: dynamic peak value of the memory
  • dynamic_used_shrctx: maximum dynamic shared memory context
  • dynamic_peak_shrctx: dynamic peak value of the shared memory context
  • shared_used_memory: used shared memory
  • cstore_used_memory: memory used for column store
  • comm_used_memory: memory used for the communication library
  • comm_peak_memory: peak memory usage of the communication library
  • other_used_memory: other used memory
  • topsql_used_memory: memory used by topsql
  • large_storage_memory: memory used for column-store compression and decompression
  • os_totalmem: total memory of the operating system
  • os_freeemem: remaining memory of the operating system

summary

text

Total estimated memory consumed by jobs on the instance and the total actual memory consumed.

abnormal_query

text

ID and queryid of the thread with the memory exception. The options are as follows:

  1. Session with the highest memory usage.
  2. Session with the largest difference between the estimated memory and the actually used memory.

abnormal_memory

text

Memory block with abnormal memory usage, including the shared memory context with the largest usage and the common memory context with the largest usage.

top_thread

text

Information about the top three threads that use the most memory:

context name: indicates the memory block of the memory that is being used.

contextlevel: indicates the context level.

sessType: indicates the type of the top context node.

totalsize[274,13,260]MB: total memory, released memory, and used memory of the current memory context, in MB.

create_time

timestamp with time zone

Time when an error indicating insufficient memory is reported.