Re: find query beening executed

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: Julius Tuskenis <julius(at)nsoft(dot)lt>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: find query beening executed
Date: 2009-10-22 08:14:57
Message-ID: dcc563d10910220114sabd30e7s499da618ceb6c497@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Oct 22, 2009 at 1:52 AM, Julius Tuskenis <julius(at)nsoft(dot)lt> wrote:
> Hello,
>
> I'd like to know if it is possible to find out the query beeing processed
> for some connection? I know theres a "Select * from pg_stat_activity", but
> if query is very long it gets "cut" and it is the end of it that interests
> me.

I usually log long running queries which gets the whole thing. (I
think...) Logs can get big if you set the minimum too low and log a
lot. But the query only gets logged when it's done, so you might not
have the right connection afterwards. But you'd have the query.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Julius Tuskenis 2009-10-22 08:38:18 Re: find query beening executed
Previous Message Julius Tuskenis 2009-10-22 07:52:09 find query beening executed