Re: track_activity_query_size note

From: Thom Brown <thom(at)linux(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: track_activity_query_size note
Date: 2012-05-24 14:43:43
Message-ID: CAA-aLv6aW9jBHEeBeC4CiMTGOPUNytdiE7d4hv=2FWq=+-rZvQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On 24 May 2012 15:19, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>> On Thu, May 24, 2012 at 2:59 PM, Thom Brown <thom(at)linux(dot)com> wrote:
>>>> I attach a proposed change to the docs which points out that if the
>>>> size of track_activity_query_size is changed and the is server
>>>> restarted, it won't have any effect if query statistics are already
>>>> present.
>
>> Ah, suddenly it makes sense.
>
>> And in that case yes, the docs changes should go under
>> pg_stat_statements, I believe.
>
> But surely the statement is flat out wrong; or if it's not wrong,
> there's a bug somewhere.  We do not absorb the value of
> track_activity_query_size from the stats file.

Hmm... well I think I may have misinterpreted the behaviour. What I
saw was the size of the query shown in pg_stat_statements remaining
unchanged after restarting the server with a new
track_activity_query_size value, but I'm guessing this is merely
because its representation remains unchanged. If I run the same query
with an extra condition on the end, it shows up as a separate row, but
not truncated to the same length as the previous query.

So I retract my proposed amendment as it's a falsehood. It was merely
an unexpected behaviour on my part. The truth is that pre-existing
queries listed in pg_stat_statements won't magically become less
truncated if track_activity_query_size is increased. That only
applies to new entries from that point that don't share the same query
signature.

--
Thom

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Hidvégi Gábor 2012-06-02 14:46:38 Starting server on OpenBSD, IE7 fix for forms
Previous Message Tom Lane 2012-05-24 14:19:10 Re: track_activity_query_size note