Re: Increasing the length of pg_stat_activity.current_query...

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Increasing the length of pg_stat_activity.current_query...
Date: 2004-11-10 20:25:20
Message-ID: 41927930.2040604@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/8/2004 5:32 PM, 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.

The pgstats were originally designed to give "hints" for tuning. That's
why they cover cache hits vs. misses per table and numbers that can be
used to point out missing as well as obsolete indexes. That was what led
to the design of the pgstats file, the UDP communication and those fixed
sizes. The goal was to let it have as little impact on the server
performance as possible. The whole "current query" stuff was added later
on request.

In my opinion it is quite pointless to attempt to transmit the last byte
of every single query sent to the backend, when all you can get out of
that view is a random query every 500 milliseconds.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-11-10 20:26:34 Re: CREATE or REPLACE function pg_catalog.*
Previous Message John Hansen 2004-11-10 20:10:03 Re: CREATE or REPLACE function pg_catalog.*