{"id":555,"date":"2012-01-19T21:39:18","date_gmt":"2012-01-20T05:39:18","guid":{"rendered":"http:\/\/blog.light42.com\/wordpress\/?p=555"},"modified":"2018-02-28T19:49:46","modified_gmt":"2018-03-01T03:49:46","slug":"pg-jobs-active","status":"publish","type":"post","link":"http:\/\/blog.light42.com\/wordpress\/?p=555","title":{"rendered":"Pg Jobs Active"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/blog.light42.com\/wordpress\/wp-content\/uploads\/2012\/06\/PostgreSQL_logo.3colors.120x120.png\" alt=\"pg_logo\" width=\"108px\" height=\"108px\" align=\"right\" \/><\/p>\n<p>I keep this one line as .sql in my home directory of all the work machines:<br \/>\n<code><br \/>\n## PG10 Syntax<br \/>\nSELECT  datname,usename,pid,client_addr,wait_event,query_start,query<br \/>\nFROM    pg_stat_activity ;<br \/>\n<\/code><\/p>\n<p>checking what is going on is easy<\/p>\n<p><code>psql -f short_queries_list.sql<\/code><\/p>\n<p>per the manual<\/p>\n<p><a title=\"pg monitoring stats\" href=\"http:\/\/www.postgresql.org\/docs\/current\/static\/monitoring-stats.html\" target=\"_blank\" rel=\"noopener\">http:\/\/www.postgresql.org\/docs\/current\/static\/monitoring-stats.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I keep this one line as .sql in my home directory of all the work machines: ## PG10 Syntax SELECT datname,usename,pid,client_addr,wait_event,query_start,query FROM pg_stat_activity ; checking what is going on is easy psql -f short_queries_list.sql per the manual http:\/\/www.postgresql.org\/docs\/current\/static\/monitoring-stats.html<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/555"}],"collection":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=555"}],"version-history":[{"count":38,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/555\/revisions"}],"predecessor-version":[{"id":3457,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/555\/revisions\/3457"}],"wp:attachment":[{"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=555"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.light42.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}