Re: work_mem memory usage statistics - Mailing list pgsql-admin

From Muhammad Ikram
Subject Re: work_mem memory usage statistics
Date
Msg-id CAJQ7xG4BV_fbB06=OSRKFq0JaQ2GW0mK11J_yxuSSri15TzQ7Q@mail.gmail.com
Whole thread Raw
In response to work_mem memory usage statistics  (Loles <lolesft@gmail.com>)
List pgsql-admin

Hi,

- No built-in routine or extension is there to show aggregation of work_mem for any query, as it is dynamically allocated.
- If work_mem requirement exceeds then it spills to disk, which can be monitored through logs. Use log_temp_files and log_statement_stats to see temp files, their size may give clues.
- pg_stat_statements and pg_stat_activity may also help in getting an idea about which queries are taking more time and their consumption of shared blocks etc.

Regards,
Ikram

On Tue, Oct 15, 2024 at 11:46 PM Loles <lolesft@gmail.com> wrote:
Hi team,

Is there any statistics table or view in the PostgreSQL catalog, extension, or similar that collects and displays work_mem memory usage statistics? It would be interesting to know the use of the work_mem by user, application and/or database.

Thanks in advance.

Loles

pgsql-admin by date:

Previous
From: Loles
Date:
Subject: work_mem memory usage statistics
Next
From: SOzcn
Date:
Subject: Backup Information