Received: from shire.ontko.com (shire.ontko.com [199.164.165.1]) by postgresql.org (Postfix) with ESMTP id 8A37947593E for ; Fri, 1 Mar 2002 16:52:08 -0500 (EST) Received: from nick (bilbo.ontko.com [199.164.165.101]) by shire.ontko.com (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id QAA12137; Fri, 1 Mar 2002 16:52:08 -0500 X-Authentication-Warning: shire.ontko.com: Host bilbo.ontko.com [199.164.165.101] claimed to be nick Reply-To: From: "Nick Fankhauser" To: "Tom Lane" Cc: "pgsql-admin" Subject: Re: Database is slow, vacuum hangs Date: Fri, 1 Mar 2002 16:47:48 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 In-Reply-To: <1393.1015017360@sss.pgh.pa.us> Importance: Normal X-Archive-Number: 200203/18 X-Sequence-Number: 3553 > Is the vacuum actually running (accumulating any CPU time)? Or is it > just waiting on a lock held by one of those other guys? After a little blip at startup, it stops using CPU. Here's a snippet of the "ps": 21966 pts/0 S 0:00 /bin/sh /usr/lib/postgresql/bin/vacuumdb temp 21971 pts/0 S 0:00 /usr/lib/postgresql/bin/psql -c VACUUM -d temp 21972 ? S 0:00 postgres: postgres temp [local] VACUUM waiting > And what are they doing --- who started them, what query was sent to > 'em, etc? Here they are- they appear to be selects via JDBC initiated by Tomcat, but I can't think of a way to find out what the actual query was (the browser sessions are gone): 18980 ? R 193:28 postgres: www-data temp 127.0.0.1 SELECT 16093 ? R 197:05 postgres: www-data temp 127.0.0.1 SELECT > If you haven't a clue, try attaching to each process with a debugger and > printing out the global variable debug_query_string. How do I do that? Thanks, NickF