X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4171A5289B for ; Mon, 20 Jun 2005 16:11:49 -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 22395-10 for ; Mon, 20 Jun 2005 19:11:44 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 37725528BD for ; Mon, 20 Jun 2005 16:11:43 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j5KJBi1I019957; Mon, 20 Jun 2005 15:11:44 -0400 (EDT) To: Dan Harris Cc: pgsql-performance@postgresql.org Subject: Re: investigating slow queries through pg_stat_activity In-reply-to: <0B5C29FA-E949-447E-AEFE-A806E238F1C2@drivefaster.net> References: <0B5C29FA-E949-447E-AEFE-A806E238F1C2@drivefaster.net> Comments: In-reply-to Dan Harris message dated "Mon, 20 Jun 2005 11:55:59 -0600" Date: Mon, 20 Jun 2005 15:11:44 -0400 Message-ID: <19956.1119294704@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/372 X-Sequence-Number: 13009 Dan Harris writes: > However, the problem I have is that pg_stat_activity only returns the > first n (255?) characters of the SQL as "current_query", so it gets > chopped off at the end. I would very much like to find out how I can > get the *entire* query that is active. Is this possible? I think the limit is ~1000 characters in 8.0 and later. However, you can't realistically have "unlimited" because of constraints of the stats messaging mechanism. regards, tom lane