Thread: running query
Hi, How can I see all the currently running queryes? thanks.
Look at contrib folder in the postgresql distribution then pg_monitor Regards, Le Vendredi 15 Novembre 2002 11:53, pginfo a écrit : > Hi, > How can I see all the currently running queryes? > > thanks. > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- Hervé Piedvache Elma Ingénierie Informatique 6 rue du Faubourg Saint-Honoré F-75008 - Paris - France Tel. 33-144949901 fax. 33-144949902
Hi, I did it. I start select * from pg_stat_activity; And as result I see datid | datname | procpid | usesysid | usename | current_query -------+---------+---------+----------+----------+--------------- 16556 | mybase | 1162 | 2 | myuser | 16556 | mybase | 1163 | 2 | myuser | 16556 | mybase | 1164 | 2 | myuser | 16556 | mybase | 1165 | 2 | myuser | I do not see the running tasks and I am sure that this tasks exist. Regards. =?iso-8859-15?q?Herv=E9=20Piedvache?= wrote: > Look at contrib folder in the postgresql distribution then pg_monitor > > Regards, > > Le Vendredi 15 Novembre 2002 11:53, pginfo a écrit : > > Hi, > > How can I see all the currently running queryes? > > > > thanks. > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 2: you can get off all lists at once with the unregister command > > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > > -- > Hervé Piedvache > > Elma Ingénierie Informatique > 6 rue du Faubourg Saint-Honoré > F-75008 - Paris - France > Tel. 33-144949901 > fax. 33-144949902 > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
pginfo <pginfo@t1.unisoftbg.com> writes: > I start select * from pg_stat_activity; > And as result I see > datid | datname | procpid | usesysid | usename | current_query > -------+---------+---------+----------+----------+--------------- > 16556 | mybase | 1162 | 2 | myuser | > 16556 | mybase | 1163 | 2 | myuser | > 16556 | mybase | 1164 | 2 | myuser | > 16556 | mybase | 1165 | 2 | myuser | You're not getting current_query, either because you haven't turned on collection of current queries by the statistics monitor, or because you are not superuser. regards, tom lane
On Fri, Nov 15, 2002 at 12:10:57PM +0100, pginfo wrote: > I start select * from pg_stat_activity; > And as result I see > datid | datname | procpid | usesysid | usename | current_query > -------+---------+---------+----------+----------+--------------- > 16556 | mybase | 1162 | 2 | myuser | > 16556 | mybase | 1163 | 2 | myuser | > 16556 | mybase | 1164 | 2 | myuser | > 16556 | mybase | 1165 | 2 | myuser | > > I do not see the running tasks and I am sure that this tasks exist. You need to be superuser, AFAIU. -- Alvaro Herrera (<alvherre[a]dcc.uchile.cl>) FOO MANE PADME HUM
I am superuser. Alvaro Herrera wrote: > On Fri, Nov 15, 2002 at 12:10:57PM +0100, pginfo wrote: > > > I start select * from pg_stat_activity; > > And as result I see > > datid | datname | procpid | usesysid | usename | current_query > > -------+---------+---------+----------+----------+--------------- > > 16556 | mybase | 1162 | 2 | myuser | > > 16556 | mybase | 1163 | 2 | myuser | > > 16556 | mybase | 1164 | 2 | myuser | > > 16556 | mybase | 1165 | 2 | myuser | > > > > I do not see the running tasks and I am sure that this tasks exist. > > You need to be superuser, AFAIU. > > -- > Alvaro Herrera (<alvherre[a]dcc.uchile.cl>) > FOO MANE PADME HUM
Not sure: maybe set stats_command_string=on; ? Cheers, Patrick On Fri, Nov 15, 2002 at 04:34:13PM +0100, pginfo wrote: > I am superuser. > > Alvaro Herrera wrote: > > > On Fri, Nov 15, 2002 at 12:10:57PM +0100, pginfo wrote: > > > > > I start select * from pg_stat_activity; > > > And as result I see > > > datid | datname | procpid | usesysid | usename | current_query > > > -------+---------+---------+----------+----------+--------------- > > > 16556 | mybase | 1162 | 2 | myuser | > > > 16556 | mybase | 1163 | 2 | myuser | > > > 16556 | mybase | 1164 | 2 | myuser | > > > 16556 | mybase | 1165 | 2 | myuser | > > > > > > I do not see the running tasks and I am sure that this tasks exist. > > > > You need to be superuser, AFAIU. > > > > -- > > Alvaro Herrera (<alvherre[a]dcc.uchile.cl>) > > FOO MANE PADME HUM > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster