Why does pg_stat_activity Truncate Queries?

Started by Josh Berkusover 21 years ago3 messages
#1Josh Berkus
josh@agliodbs.com

Folks,

I was just noticing that pg_stat_activity is truncating queries which are
logged to it at about 150 chars. I can't think of any good reason for this.
Is there one?

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Josh Berkus (#1)
Re: Why does pg_stat_activity Truncate Queries?

Josh Berkus <josh@agliodbs.com> writes:

I was just noticing that pg_stat_activity is truncating queries which are
logged to it at about 150 chars.

256, I would expect.

I can't think of any good reason for this.

There is good reason to limit the packet size, but to a kilobyte or so.
Feel free to bump up PGSTAT_ACTIVITY_SIZE to 1000 or so in
src/include/pgstat.h (and yes, this is already done for 8.0).

regards, tom lane

#3Gaetano Mendola
mendola@bigfoot.com
In reply to: Tom Lane (#2)
Re: Why does pg_stat_activity Truncate Queries?

Tom Lane wrote:

Josh Berkus <josh@agliodbs.com> writes:

I was just noticing that pg_stat_activity is truncating queries which are
logged to it at about 150 chars.

256, I would expect.

I can't think of any good reason for this.

There is good reason to limit the packet size, but to a kilobyte or so.
Feel free to bump up PGSTAT_ACTIVITY_SIZE to 1000 or so in
src/include/pgstat.h (and yes, this is already done for 8.0).

I didn't see this changement in the 8.0 release note, don't you think shall
be added ?

Regards
Gaetano Mendola