Questions tagged [pg-stat-activity]
pg_stat_activity is a PostgreSQL table that contains statistics about running queries in the DBMS.
7
questions
-1
votes
1
answer
32
views
Best resolution for NULL connections?
my_database_name> SELECT pid, datname, usename, application_name, query_start, state, state_change FROM pg_stat_activity;
+-------+------------------+------------------+--------------------------+--...
1
vote
0
answers
74
views
How to list query which used an index while selecting result in Postgres?
I know that Postgres has some utility extensions that collect stats for statements and indexes.
I want to list queries which used particular index, whichselectsg the result. Is there a way to get that ...
0
votes
1
answer
640
views
What does pg_stat_activity.xact_start mean for autovacuum threads?
If I see something like:
db=> SELECT datname,pid,state, (now() - query_start)::interval, query FROM pg_stat_activity where state != 'idle' and query like 'autovacuum%';
datname | pid | state | ...
5
votes
1
answer
1k
views
PostgreSQL: Run EXPLAIN on all queries in pg_stat_activity
I am investigating high load on a PostgreSQL database on RDS. As a part of the investigation, I'm running the following query:
SELECT now()-query_start, state, query FROM pg_stat_activity ORDER BY 1 ...
2
votes
1
answer
948
views
Why is pg_stat_activity.query_start null for almost all queries? [closed]
Why is pg_stat_activity.query_start null for almost all queries? What is the meaning of a NULL query_start field?
2
votes
1
answer
3k
views
pg_stat_statements causing DB to run out of memory
I enabled pg_stat_statements on an AWS RDS postgres 9.6.3 instance with 30GB RAM.
We got the error message below in postgres log, and an event saying OS killed DB server process due to excessive ...
0
votes
2
answers
1k
views
pg_stat_activity entries with no corresponding process on the client
If I see an entry in pg_stat_activity for a client_addr:client_port combination where there is no process bound to that port on the indicated client, what does that mean? Just that the client process ...