Difference between revisions of "Pg stat activity"

From wikieduonline
Jump to navigation Jump to search
Line 8: Line 8:
 
  [[SELECT * FROM pg_stat_activity;]]
 
  [[SELECT * FROM pg_stat_activity;]]
  
  ELECT * FROM pg_stat_activity WHERE datname = 'dbname' and state = 'active';
+
  [[SELECT]] * FROM pg_stat_activity WHERE datname = 'dbname' and state = 'active';
  
 
  SELECT [[pg_terminate_backend]](__pid__) from pg_stat_activity;
 
  SELECT [[pg_terminate_backend]](__pid__) from pg_stat_activity;

Revision as of 11:40, 16 December 2022

select count(*) from pg_stat_activity where query like 'autovacuum:%';
count
-------
     0
(1 row)
SELECT * FROM pg_stat_activity;
SELECT * FROM pg_stat_activity WHERE datname = 'dbname' and state = 'active';
SELECT pg_terminate_backend(__pid__) from pg_stat_activity;

Related terms

See also

Advertising: