X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8331A52AC6 for ; Mon, 15 Aug 2005 18:14:37 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27683-03 for ; Mon, 15 Aug 2005 21:14:35 +0000 (GMT) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.196]) by svr1.postgresql.org (Postfix) with ESMTP id 6691C52B89 for ; Mon, 15 Aug 2005 18:14:34 -0300 (ADT) Received: by nproxy.gmail.com with SMTP id b2so223372nfe for ; Mon, 15 Aug 2005 14:14:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=sXUuxoIFlxH0BcYApB05PbrWg8ksytAhexkooviV93u+bZXXmAu+kgJTSGhQ/PWohykYqKgnJ3/OP+9ShDpoTskM8RjEDWUct9XPse/LvJjgSiIjyGOumpHGl4VFg+POj4MMfNascBi54OBi1tRiMCqWw8ooaisASwNXyz1RTcQ= Received: by 10.48.250.16 with SMTP id x16mr162618nfh; Mon, 15 Aug 2005 14:14:35 -0700 (PDT) Received: by 10.48.144.16 with HTTP; Mon, 15 Aug 2005 14:14:35 -0700 (PDT) Message-ID: Date: Mon, 15 Aug 2005 22:14:35 +0100 From: Guido Barosio To: Chris Hoover Subject: Re: Any way to see what queries are currently running? Cc: pgsql-admin@postgresql.org In-Reply-To: <1d219a6f05081513546f6458b6@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9096_9875139.1124140475736" References: <1d219a6f05081513546f6458b6@mail.gmail.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.165 required=5 tests=[AWL=0.084, HTML_30_40=0.056, HTML_MESSAGE=0.001, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200508/185 X-Sequence-Number: 18504 ------=_Part_9096_9875139.1124140475736 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline In order to know about the current activity you should "select * from pg_stat_activity" which I think is a view. You may also want to \d pg_stat_activity to check the relations you may=20 find usefull. But, if this is a default installation, you may find that you need to tune= =20 some parameters in your postgresql.conf file. Read the man pages (online documentation) in= =20 order to understand better what you are looking for. Best wishes, G.- On 8/15/05, Chris Hoover wrote:=20 >=20 > I'm running 7.3.4. Is there anyway to see the actual sql being run by > the database via a query? I am having some problems with long running > load causing querires from our reporting system. I have sql logging > turned on to log the sql statements to my postgres.log file. However, > these reporting queries do not appear to be logging the entire query. > I am only getting the select clause (and I'm not sure if it's all of > it) but no from or where clause. >=20 > Can I pull these queries out from postgres? >=20 > Thanks, >=20 > Chris >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings >=20 --=20 "Adopting the position that you are smarter than an automatic optimization algorithm is generally a good way to achieve less performance, not more" - Tom Lane. ------=_Part_9096_9875139.1124140475736 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
In order to know about the current activity you should
 
"select * from pg_stat_activity" which I think is a view.
 
You may also want to \d pg_stat_activity to check the relations you ma= y find
usefull.
 
But, if this is a default installation, you may find that you need to = tune some parameters
in your postgresql.conf file. Read the man pages (online documentation= ) in order to understand
better what you are looking for.
 
Best wishes,
G.-

 
On 8/15/05, = Chris Hoover <revoohc@gmail.com= > wrote:
I'm running 7.3.4.  Is= there anyway to see the actual sql being run by
the database via a quer= y?  I am having some problems with long running
load causing querires from our reporting system.  I have sql = logging
turned on to log the sql statements to my postgres.log file.&nbs= p; However,
these reporting queries do not appear to be logging the= entire query.
I am only getting the select clause (and I'm not sure if it's all of
it)= but no from or where clause.

Can I pull these queries out from post= gres?

Thanks,

Chris

---------------------------(end of= broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings



--
"Adopting the position th= at you are smarter than an automatic
optimization algorithm is generally= a good way to achieve less
performance, not more" - Tom Lane.=20 ------=_Part_9096_9875139.1124140475736--