Re: investigating slow queries through pg_stat_activity

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dan Harris <fbsd(at)drivefaster(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: investigating slow queries through pg_stat_activity
Date: 2005-06-20 19:11:44
Message-ID: 19956.1119294704@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Dan Harris <fbsd(at)drivefaster(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message George Essig 2005-06-20 20:30:38 Re: investigating slow queries through pg_stat_activity
Previous Message Jacques Caron 2005-06-20 18:45:54 Re: investigating slow queries through