Re: investigating slow queries through pg_stat_activity - Mailing list pgsql-performance

From Tom Lane
Subject Re: investigating slow queries through pg_stat_activity
Date
Msg-id 19956.1119294704@sss.pgh.pa.us
Whole thread Raw
In response to investigating slow queries through pg_stat_activity  (Dan Harris <fbsd@drivefaster.net>)
List pgsql-performance
Dan Harris <fbsd@drivefaster.net> writes:
> However, the problem I have is that pg_stat_activity only returns the
> first n (255?) characters of the SQL as "current_query", so it gets
> chopped off at the end.  I would very much like to find out how I can
> get the *entire* query that is active.  Is this possible?

I think the limit is ~1000 characters in 8.0 and later.  However, you
can't realistically have "unlimited" because of constraints of the stats
messaging mechanism.

            regards, tom lane

pgsql-performance by date:

Previous
From: Jacques Caron
Date:
Subject: Re: investigating slow queries through
Next
From: George Essig
Date:
Subject: Re: investigating slow queries through pg_stat_activity