Few executables of an application that is connected to the Postgres database are using 100% resources and in Linux OS, I can see that the postmaster is using 100% CPU, so, I am in need to find the queries associated with the postmaster(100%CPU) OSPID from the database.
Asked
Active
Viewed 558 times
0
-
`select * from pg_stat_activity` – Aug 20 '20 at 08:53
-
You ask how to identify it, but then say it is using 100% CPU. How do you know that if you can't identify it? The master process doesn't run queries, it mostly just launches other processes. – jjanes Aug 20 '20 at 12:04
-
Suppose there is a buggy application with around 80 executables, and five of them trigger an expensive queries that lead to 100% use of the postmaster process, now, I want to identify the query that is associated with the postmaster process that is consuming 100% resources, is there any table in Postgres that keeps a record of the executable's process id and the query related to it? – Sujeet Chaurasia Aug 21 '20 at 07:34