Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B010963245D for ; Fri, 27 Mar 2009 04:18:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 77124-02 for ; Fri, 27 Mar 2009 04:18:20 -0300 (ADT) Received: from mx3.hub.org (mx3.hub.org [206.223.169.73]) by mail.postgresql.org (Postfix) with ESMTP id 868CD632388 for ; Fri, 27 Mar 2009 04:18:23 -0300 (ADT) X-Greylist: delayed 00:30:09.977097 by SQLgrey-1.7.6 Received: from serv2.oss.ntt.co.jp (serv2.oss.ntt.co.jp [222.151.198.100]) by mx3.hub.org (Postfix) with ESMTP id DCBC437BCEE for ; Fri, 27 Mar 2009 04:18:22 -0300 (ADT) Received: from serv2.oss.ntt.co.jp (localhost [127.0.0.1]) by serv2.oss.ntt.co.jp (Postfix) with ESMTP id A23112480BC; Fri, 27 Mar 2009 15:44:57 +0900 (JST) Received: from serv1.oss.ntt.co.jp (serv1.localdomain [172.19.0.2]) by serv2.oss.ntt.co.jp (Postfix) with ESMTP id 90A662480BA; Fri, 27 Mar 2009 15:44:57 +0900 (JST) Received: from [127.0.0.1] (unknown [172.17.1.145]) by serv1.oss.ntt.co.jp (Postfix) with ESMTP id 2AAD8104165; Fri, 27 Mar 2009 15:44:57 +0900 (JST) Message-ID: <49CC75E3.7010101@oss.ntt.co.jp> Date: Fri, 27 Mar 2009 15:44:51 +0900 From: Tatsuhito Kasahara User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Simon Riggs CC: pgsql-hackers@postgresql.org Subject: Re: display previous query string of idle-in-transaction References: <49C9F49B.8020003@oss.ntt.co.jp> <1238091273.16568.530.camel@ebony.2ndQuadrant> In-Reply-To: <1238091273.16568.530.camel@ebony.2ndQuadrant> Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/1111 X-Sequence-Number: 135789 Simon Riggs wrote: >> If we can also check previous query_string of idle-in-transaction, >> it is useful for analysis of long transaction problem. > > I'm more interested in the problem itself. Why do you think there is a > problem and why does knowing this help you? I had similar problems > recently, so I'm interested in thoughts around this. In many case, applications don't know what queries they are doing. So, if a long transaction problem (unworking defragmnetation by HOT and VACUUM) occured, I don't understand which application is the cause with only " in transaction" message. But if I can also check last query string, I guess which apllication do that and point out the problem point. # As I said, I think a long transaction is not a problem itself. Does that answer your question ? Best regards, -- Tatsuhito Kasahara kasahara.tatsuhito@oss.ntt.co.jp