Re: Database is slow, vacuum hangs - Mailing list pgsql-admin

From Nick Fankhauser
Subject Re: Database is slow, vacuum hangs
Date
Msg-id NEBBLAAHGLEEPCGOBHDGIEIKEHAA.nickf@ontko.com
Whole thread Raw
In response to Re: Database is slow, vacuum hangs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Database is slow, vacuum hangs
List pgsql-admin
> 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



pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Database is slow, vacuum hangs
Next
From: Tom Lane
Date:
Subject: Re: Database is slow, vacuum hangs