Analyzer pg-mem-pool
Name
pg-mem-pool - PostgreSQL Memory Pool Size
This analyzer monitors memory pool allocation and usage within PostgreSQL database processes. It tracks memory consumption across different PostgreSQL memory contexts, including shared buffers, work memory, and maintenance work memory. The analyzer helps database administrators optimize memory configurations, identify memory-intensive queries, and troubleshoot out-of-memory issues in PostgreSQL deployments.
Resource Category
Memory.
Application Type & Technical Stack
- PostgreSQL
Command Line Syntax
The analyzer can be invoked directly on the command-line via the orxray
utility from the openresty-xray-cli software package.
Alternatively, the analyzer can also be invoked manually or automatically on the web console UI of OpenResty XRay (like on the Advanced web page).
# PID is the target process PID.
orxray analyzer run pg-mem-pool -p PID
# trace a shell command directly
orxray analyzer run pg-mem-pool -c SHELL_CMD
Tracing Multiple Processes
Not supported.
Output Formats
- Plain Texts
Output Example
[
{
"title": "Memory Pool Size of PostgreSQL",
"type": "table",
"ver": 1,
"data": [
[ "Pool Name", "Size(byte)" ],
[ "anl_context", "0" ],
[ "ApplyMessageContext", "0" ],
[ "AutovacMemCxt", "0" ],
[ "CurrentDynaHashCxt", "5352" ],
[ "DatabaseListCxt", "0" ],
[ "EventTriggerCacheContext", "0" ],
[ "fscxt", "0" ],
[ "LogicalRepRelMapContext", "0" ],
[ "MdCxt", "40" ],
[ "MXactContext", "0" ],
[ "nogc", "0" ],
[ "parsed_hba_context", "40" ],
[ "parsed_ident_context", "40" ],
[ "TopPortalContext", "0" ],
[ "TransactionAbortContext", "0" ],
[ "vac_context", "0" ],
[ "xloginsert_cxt", "166064" ]
]
}
]
Author
The OpenResty Inc. Team.
Copyright
Copyright (C) by OpenResty Inc. All rights reserved.