X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id DCC4B53870 for ; Tue, 29 Mar 2005 17:02:19 +0100 (BST) 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 98524-01 for ; Tue, 29 Mar 2005 16:02:17 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4D2DA533BB for ; Tue, 29 Mar 2005 17:02:14 +0100 (BST) 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 j2TG2EH4022781; Tue, 29 Mar 2005 11:02:14 -0500 (EST) To: Adam Witney Cc: pgsql-admin Subject: Re: Determine current running query, but no query in pg_stat_activity In-reply-to: References: Comments: In-reply-to Adam Witney message dated "Tue, 29 Mar 2005 16:50:27 +0100" Date: Tue, 29 Mar 2005 11:02:14 -0500 Message-ID: <22780.1112112134@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: 200503/464 X-Sequence-Number: 16962 Adam Witney writes: > I am logged in as the superuser, and I just switched stats_command_string > on. Just now? Too late then --- it needed to be on at the time the other guy started his query, else he did not send the string to the stats collector. > I did find a reference on google to the fact that there was/is a max query > size length for this? Yeah, but it truncates, it doesn't just drop the string. If you are feeling desperate you can attach to the other backend with gdb: $ gdb /path/to/postgres backend-PID gdb> print debug_query_string gdb> quit detach and let process continue? y $ regards, tom lane