Re: Increasing the length of - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Increasing the length of
Date
Msg-id 1100000060.3979.273.camel@localhost.localdomain
Whole thread Raw
In response to Re: Increasing the length of pg_stat_activity.current_query...  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Increasing the length of
List pgsql-hackers
On Mon, 2004-11-08 at 22:32, Tom Lane wrote:
> Another relevant question is why you are expecting to get this
> information through pgstats and not by looking in the postmaster log.

This is only available if you log all queries, which isn't normally done
while you are in production. When you hit a long running query, you do
wish you had that enabled, and if it was you could look there. 

It would be best to leave the postmaster logging turned off, then allow
dynamic inspection of the query iff you have a rogue query.

This is an important admin consideration for data warehousing.

> I don't know about you, but I don't have any tools that are designed to
> cope nicely with looking at tables that have columns that might be many
> K wide.  Looking in the log seems a much nicer way of examining the full
> text of extremely long queries.  So I think it's actually a good thing
> that pgstats truncates the queries at some reasonable width.

You're right...if the query was in the log, thats where I'd look.

In general, I'm not bothered whether I can see the whole query or not.
But it would be good to have a mode of operation that allows the whole
query to be seen via pg_stat_activity, when required.

Could this allow some dynamic behaviour? i.e. set it low, as Tom
suggests for most of the time, then set it higher, as Greg suggests,
upon demand, for a short period only? [Not sure, but I think it may only
be sent once at start of query, then never again....so may be a hole in
this thinking]

-- 
Best Regards, Simon Riggs



pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Increasing the length of pg_stat_activity.current_query...
Next
From: Tom Lane
Date:
Subject: Call for objections: simplify stable functions during estimation