pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dan Harris <fbsd@drivefaster.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: investigating slow queries through pg_stat_activity
Date: Mon, 20 Jun 2005 15:11:44 -0400
Message-ID: <19956.1119294704@sss.pgh.pa.us> (raw)
In-Reply-To: <0B5C29FA-E949-447E-AEFE-A806E238F1C2@drivefaster.net>
References: <0B5C29FA-E949-447E-AEFE-A806E238F1C2@drivefaster.net>

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



view thread (4+ messages)  latest in thread

Message-ID: <19956.1119294704@sss.pgh.pa.us>
Permalink:  ../19956.1119294704@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19956.1119294704@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, fbsd@drivefaster.net
  Subject: Re: investigating slow queries through pg_stat_activity
  In-Reply-To: <19956.1119294704@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox