Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 1F7BF9FB7A8 for ; Mon, 22 Jan 2007 02:46:29 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 47736-01 for ; Mon, 22 Jan 2007 02:46:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id F41809FB655 for ; Mon, 22 Jan 2007 02:44:59 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id l0M6iw1t006525; Mon, 22 Jan 2007 01:44:58 -0500 (EST) To: "Rajesh Kumar Mallah" cc: "Lista Postgres" Subject: Re: Getting previous statements executed a backend currenly in an in transaction state. In-reply-to: References: Comments: In-reply-to "Rajesh Kumar Mallah" message dated "Mon, 22 Jan 2007 09:55:16 +0530" Date: Mon, 22 Jan 2007 01:44:58 -0500 Message-ID: <6524.1169448298@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/188 X-Sequence-Number: 24344 "Rajesh Kumar Mallah" writes: > This issue has been posted before also but this time i wanted > to know, if it is possible to know what statements have been > executed by the backend in the same transaction which is currently > idle. this can probably help us in identifying the faulty application > code. > in past we had set a logging prefix in guc and used grep to digout > the statements but that was logging all statements which was > probably not a good idea in production environment. Can some > one suggest if anything else is readily available. AFAICS, log_statement and friends are much cheaper than any other alternative could be. regards, tom lane