Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyQ70-000450-5C for pgsql-admin@arkaria.postgresql.org; Thu, 24 Jan 2013 16:57:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TyQ6z-0008WI-54 for pgsql-admin@arkaria.postgresql.org; Thu, 24 Jan 2013 16:57:13 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyQ6x-0008VK-OU for pgsql-admin@postgresql.org; Thu, 24 Jan 2013 16:57:11 +0000 Received: from nm9-vm4.bullet.mail.ne1.yahoo.com ([98.138.91.169]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyQ6u-0005Tz-5r for pgsql-admin@postgresql.org; Thu, 24 Jan 2013 16:57:11 +0000 Received: from [98.138.226.176] by nm9.bullet.mail.ne1.yahoo.com with NNFMP; 24 Jan 2013 16:57:06 -0000 Received: from [98.138.89.246] by tm11.bullet.mail.ne1.yahoo.com with NNFMP; 24 Jan 2013 16:57:06 -0000 Received: from [127.0.0.1] by omp1060.mail.ne1.yahoo.com with NNFMP; 24 Jan 2013 16:57:06 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 98731.59815.bm@omp1060.mail.ne1.yahoo.com Received: (qmail 30421 invoked by uid 60001); 24 Jan 2013 16:57:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1359046625; bh=WttoRIsXPxVua9NwaVY33NouBcEsq4QJV54VvLQ+nRU=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=XGJgP6qoH9Dxyrg2cweg8v+wISpewuPrLHF/8xn5UOsDam5TDUUePlcdj+7Kk8KyApgAlmEjKH6/rgqsiirGR/LLLZr6pIsa7MmzmOAIKVBc3kBj1ZFrUO5eklDwJk7wDhtNDJ4drnhwmSb9FFJyb6tFkftpYrY+aPOkzfJvIfg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=sTnIHr3+t/MV3+LbyrofDUTU6VeRosZverEL9KTe8G4ot0Q2FBSY5L4hEKrx04v5x5eorz6ivjdzftGHIFXAw8BFMJIXDqIeczWyirOqqOtRV6qP9rwqzxBs2tV1KKYA8x133HompkV4wWZMESwKQh7VdFjuU8xSZ65t6/JToh8=; X-YMail-OSG: UPqwgCoVM1m0xNjMZQNqtoSbhP8lN5UBCN3uVqKy3tvibcz S87SStYywb7yOVyjzjsSh04Y0mPUb3nRThcsZg.Fj0GgYz1Ud_X8ym93qXcO CJXdet.gZVjm1BnCEDToFIIjEI5GYgcAg_Ey_1gFqoUWy2LHJ2eCdzScsWUO niCRCYFNdqrIkVf_.tV2vaBIy.JDgpqRMPDKZccCKZHimCPuHPipUwE0wjZU C_rXoSx1xtbt2AAcsntmwLP_OFy22ngPDJRbWk8F1.HaBOM0fRHQudOJV8l9 3vJivvYkE4g3bYo77fP64obwvkHeKEO3c8g8W0iPx0svJK_ZIRCDJfqGW1BY uPnwBFCpXdUsYGJmDIu9bpzAFJocphOqK8QC__6vwS3TBjRuMFr0cojlGEpp kijEW1YJszdqiFVcvGLn0rYxoLLwCsEvmyYFTDF4DGt6OuM44w7N1bD88ndc oiJSIJHxFGZe2Pn1RB6srM6150_kg5SWUvUJh88pj9C6FkKgFr1EUtzXuK6A XkPQ_XcXt9_VSSEjoKA-- Received: from [208.84.47.48] by web120904.mail.ne1.yahoo.com via HTTP; Thu, 24 Jan 2013 08:57:04 PST X-Rocket-MIMEInfo: 001.001, SGksClRoZSBwcm9ibGVtIGlzIHRoZSBjdXJyZW50X3F1ZXJ5IChpbiBwZ19zdGF0X2FjdGl2aXR5KSBjb250YWlucyBiaW5kIHZhcmlhYmxlcyBhbmQgSSBjYW4ndCBqdXN0IHRha2UgaXQgdG8gZG8gdGhlIGV4cGxhaW4gKGFuZCwgb2YgY291cnNlIEkgZG9uJ3Qga25vdyB0aGUgdmFsdWVzIG9mIHRoZSBiaW5kIHZhcmlhYmxlcykuCsKgCk9uIGEgcmVsYXRlZCBpc3N1ZSwgaG93IGNhbiBJIHNlZSB0aGUgYWN0dWFsIHNxbCBzdGF0ZW1lbnQgd2hlbiB0aGUgY3VycmVudF9xdWVyeSBzaG93cyAiPHVubmFtZWQBMAEBAQE- X-Mailer: YahooMailWebService/0.8.130.494 References: <1358965207.49445.YahooMailNeo@web120905.mail.ne1.yahoo.com>, <1359018497.35010.YahooMailNeo@web125906.mail.ne1.yahoo.com> Message-ID: <1359046624.26078.YahooMailNeo@web120904.mail.ne1.yahoo.com> Date: Thu, 24 Jan 2013 08:57:04 -0800 (PST) From: Dan Ng Reply-To: Dan Ng Subject: Re: Getting To: Greg Williamson Cc: "pgsql-admin@postgresql.org" In-Reply-To: <1359018497.35010.YahooMailNeo@web125906.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-895799069-1119639789-1359046624=:26078" X-Pg-Spam-Score: -0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org ---895799069-1119639789-1359046624=:26078 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi,=0AThe problem is the current_query (in pg_stat_activity) contains bind = variables and I can't just take it to do the explain (and, of course I don'= t know the values of the bind variables).=0A=A0=0AOn a related issue, how c= an I see the actual sql statement when the current_query shows "".=0Apg_cursors is only accessible within the same transaction and a= s a DBA we want to see that cursor of any active transactions.=0AThanks,=0A= -Dan=0A=0A=0A=0A________________________________=0AFrom: Greg Williamson =0ATo: =0ACc: "pgsql-admin@postgresql.org" =0ASent: Thursday, January 24, 2013 1:08 AM=0ASubject: = Re: [ADMIN] Getting=0A=0ADan --=0A=0A>________________________________=0A> = From: Michael Holt =0A>To: Raghavendra ; Dan Ng =0A>Cc: "pgsql-admin@postgre= sql.org" =0A>Sent: Wednesday, January 23, 2013= 9:55 PM=0A>Subject: Re: [ADMIN] Getting=0A> =0A>=0A> =0A>Of course you can= also see what the query plan will be without having to run the query throu= gh a standard explain query: =0A>=0A>=0A>http://www.postgresql.org/docs/9.0= /static/sql-explain.html=0A>=0A>=0AI am not familiar with the Oracle tools,= but you should note that the "EXPLAIN ANALYZE" does actually do the transa= ction, so if you doing an update / insert / delete you may want to wrap it = in an explicit transaction and then roll it back.=0A=0AHTH,=0A=0AGreg Willi= amson=0A=0A=0A=0A-- =0ASent via pgsql-admin mailing list (pgsql-admin@postg= resql.org)=0ATo make changes to your subscription:=0Ahttp://www.postgresql.= org/mailpref/pgsql-admin ---895799069-1119639789-1359046624=:26078 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,
The problem is the c= urrent_query (in pg_stat_activity) contains bind variables and I can't just= take it to do the explain (and, of course I don't know the values of the b= ind variables).
 
On a related issu= e, how can I see the actual sql statement when the current_query shows "<= ;unnamed portal x>".
pg_cursors is only accessible within the same tr= ansaction and as a DBA we want to see that cursor of any active transaction= s.
Thanks,
-Dan

From:= Greg Williamson <gwilliamson39@yahoo.com>
To:
Cc: "pgsql-admin@postgresql.org" <pgsql-admin@postgresq= l.org>
Sent: Thursda= y, January 24, 2013 1:08 AM
Subject= : Re: [ADMIN] Getting

Dan --

>____= ____________________________
> From: Michael Holt <MHolt@terapeak.com>
>To= : Raghavendra <raghavendra.rao@enterprisedb= .com>; Dan Ng <surfnet@yahoo.com>
>Cc: "pgsql-admin@postgresql.org" <pgsql-admin@postg= resql.org>
>Sent: Wednesday, January 23, 2013 9:55 PM
>= Subject: Re: [ADMIN] Getting
>
>
>
>Of course you= can also see what the query plan will be without having to run the query t= hrough a standard explain query:
>
>
>http://www.postgre= sql.org/docs/9.0/static/sql-explain.html
>
>
I am not famili= ar with the Oracle tools, but you should note that the "EXPLAIN ANALYZE" does actually= do the transaction, so if you doing an update / insert / delete you may wa= nt to wrap it in an explicit transaction and then roll it back.

HTH,=

Greg Williamson



--
Sent via pgsql-admin mailing = list (pgsql-admin@postgresql.org)
To make changes t= o your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
<= BR>
---895799069-1119639789-1359046624=:26078--