반응형
현재 실행중인 DB 프로세스 확인 방법은?
postgres=# select * from pg_stat_activity;
현재 실행중인 쿼리, 접속 후 대기 중인(IDLE) IP 등이 출력됩니다.
-------+----------+---------+----------+----------+---------------------------------+---------+-------------------------------+-------------------------------+-------------------------------+-----------------+------------- datid | datname | procpid | usesysid | usename | current_query | waiting | xact_start | query_start | backend_start | client_addr | client_port -------+----------+---------+----------+----------+---------------------------------+---------+-------------------------------+-------------------------------+-------------------------------+-----------------+------------- 16386 | shop | 7933 | 16384 | shopcafe | <IDLE> | f | | 2009-01-13 16:58:25.424858+09 | 2009-01-13 16:58:25.354049+09 | 118.219.233.56 | 39856 16386 | shop | 7811 | 16384 | shopcafe | SELECT * from members where id='test' | f | 2009-01-13 16:58:25.874498+09 | 2009-01-13 16:58:25.874498+09 | 2009-01-13
반응형