Re: viewing large queries in pg_stat_activity

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: David Kerr <dmk(at)mr-paradox(dot)net>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: viewing large queries in pg_stat_activity
Date: 2010-02-09 10:09:24
Message-ID: 9837222c1002090209l37db5b50wc8018977e0345b9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/2/9 David Kerr <dmk(at)mr-paradox(dot)net>:
> It seems like pg_stat_activity truncates the current_query to about 1024 characters.
>
> The field is a text, so i'm wondering if there is a way to see the full query?
>
> (I know i can turn on log_statement=all, or log_min_duration_statement) but i'd like
> something that doesn't require a restart.

The data isn't being tracked, so there is no way to show it. The
length of the query tracked can be found in the parameter
track_activity_query_size. Note that increasing that will obviously
increase the overhead of collecting it.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Anton Maksimenkov 2010-02-09 10:18:10 Re: Memory Usage and OpenBSD
Previous Message Willy-Bas Loos 2010-02-09 10:00:31 logging statements from hibernate to valid SQL