Re: get current queries
От | Chris Miles |
---|---|
Тема | Re: get current queries |
Дата | |
Msg-id | 3F434543.4040104@psychofx.com обсуждение исходный текст |
Ответ на | get current queries ("Ramil Sagum" <ramil@astra.ph>) |
Список | pgsql-admin |
There is a simple way to get this all from psql. First edit postgresql.conf and make sure: stats_command_string = true (and restart or HUP postmaster if necessary) Then connect to your database and use my favorite query: SELECT datname,procpid,current_query FROM pg_stat_activity ORDER BY procpid; which will give you database name, pid and current query (or <IDLE>) for each current connection to the database. Note that you will see queries for all databases, not just the one you connected to. This is what I use for 7.1, I don't know if it differs for newer versions. Cheers, CM -- Chris Miles http://chrismiles.info/ Ramil Sagum wrote: > > is there any way to see what statements/queries are currently being passed > on to the database? > > > > ---------------------------(end of broadcast)--------------------------- > TIP 7: don't forget to increase your free space map settings
В списке pgsql-admin по дате отправления: