Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 019879FB572 for ; Mon, 22 Jan 2007 00:25:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 78286-01 for ; Mon, 22 Jan 2007 00:25:18 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by postgresql.org (Postfix) with ESMTP id 05CD39F9C35 for ; Mon, 22 Jan 2007 00:25:17 -0400 (AST) Received: by nf-out-0910.google.com with SMTP id x4so1229357nfb for ; Sun, 21 Jan 2007 20:25:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=j15i4FtOPS2qCDv/bc5ZR8jkYFXWlPrmaJMX16exc3gaqkU8HNyhwazfLh3KL45EEnG2FTofhlsmvDurf72ByfiEG/Heu2Og6eKIr0qrbi5vWke1sKj3hUw3hp5OUGtgk5jm68f4J6H5r+jJDALsKoFhw98ie3D6PUEmoDUvGv4= Received: by 10.49.29.3 with SMTP id g3mr6055998nfj.1169439916579; Sun, 21 Jan 2007 20:25:16 -0800 (PST) Received: by 10.48.213.16 with HTTP; Sun, 21 Jan 2007 20:25:16 -0800 (PST) Message-ID: Date: Mon, 22 Jan 2007 09:55:16 +0530 From: "Rajesh Kumar Mallah" To: "Lista Postgres" Subject: Getting previous statements executed a backend currenly in an in transaction state. MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/185 X-Sequence-Number: 24341 Dear Friends, Due to some bug(s) in our apps , in a mod_perl environment many backend remain in in transaction state. This backends sometimes block other statements in batch processes which in turn blocks access to some production tables. 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. regds mallah.