You can perform common memory diagnostics or shared memory diagnostics based on your
Check the polar_stat_activity_rt
view to obtain memory details. The following code provides an example:
SELECT pid, rss
ORDER BY rss
DESC; \watch 1
Then, you can use the polar_backends_mcxt
view to check the memory context that occupies the most memory space in the process.
Note No details about memory contexts of ApsaraDB PolarDB PostgreSQL-compatible edition are provided. To further analyze memory context, you must use kernel code or SQL
You can view the distribution of shared memory in the polar_stat_shmem view.