Re: Any way to see what queries are currently running?

From: Guido Barosio <gbarosio(at)gmail(dot)com>
To: Chris Hoover <revoohc(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Any way to see what queries are currently running?
Date: 2005-08-15 21:14:35
Message-ID: f7f6b4c705081514142baf235e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

In order to know about the current activity you should
"select * from pg_stat_activity" which I think is a view.
You may also want to \d pg_stat_activity to check the relations you may
find
usefull.
But, if this is a default installation, you may find that you need to tune
some parameters
in your postgresql.conf file. Read the man pages (online documentation) in
order to understand
better what you are looking for.
Best wishes,
G.-

On 8/15/05, Chris Hoover <revoohc(at)gmail(dot)com> wrote:
>
> I'm running 7.3.4. Is there anyway to see the actual sql being run by
> the database via a query? I am having some problems with long running
> load causing querires from our reporting system. I have sql logging
> turned on to log the sql statements to my postgres.log file. However,
> these reporting queries do not appear to be logging the entire query.
> I am only getting the select clause (and I'm not sure if it's all of
> it) but no from or where clause.
>
> Can I pull these queries out from postgres?
>
> Thanks,
>
> Chris
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

--
"Adopting the position that you are smarter than an automatic
optimization algorithm is generally a good way to achieve less
performance, not more" - Tom Lane.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2005-08-16 01:31:01 Re: vacuumdb -a -f
Previous Message Chris Hoover 2005-08-15 20:54:20 Any way to see what queries are currently running?