pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed[doc] modifying unit from characters to bytes
7+ messages / 3 participants
[nested] [flat]
Commits from this thread:
2020-07-09 a5cd7047e7 331da659be 0df3f9cb92 08952572a7 f03a34ad2c doc: Correct the description about the length of pg_stat_activity.query.
* [doc] modifying unit from characters to bytes
@ 2020-07-08 01:54 torikoshia <torikoshia@oss.nttdata.com>
0 siblings, 1 reply; 7+ messages in thread
From: torikoshia @ 2020-07-08 01:54 UTC (permalink / raw)
To: pgsql-hackers
Hi,
The manual describes the size of pg_stat_activity.query
as below:
| By default the query text is truncated at 1024 characters;
When considering multibyte characters, it seems more
accurate to change the unit from "characters" to "bytes".
I also searched other "[0-9] characters" in the manual.
I may overlook something, but apparently it seems ok
because of their contexts which are limited to ASCII
character or other reasons.
Regards,
--
Atsushi Torikoshi
NTT DATA CORPORATION
Attachments:
0001-modifying-unit-from-characters-to-bytes.patch (text/x-diff, 741B) download
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 211d279094..e03e612e8a 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -894,7 +894,7 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
<structfield>state</structfield> is <literal>active</literal> this field shows the
currently executing query. In all other states, it shows the last query
that was executed. By default the query text is truncated at 1024
- characters; this value can be changed via the parameter
+ bytes; this value can be changed via the parameter
<xref linkend="guc-track-activity-query-size"/>.
</para></entry>
</row>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [doc] modifying unit from characters to bytes
@ 2020-07-08 02:25 Fujii Masao <masao.fujii@oss.nttdata.com>
parent: torikoshia <torikoshia@oss.nttdata.com>
0 siblings, 1 reply; 7+ messages in thread
From: Fujii Masao @ 2020-07-08 02:25 UTC (permalink / raw)
To: torikoshia <torikoshia@oss.nttdata.com>; pgsql-hackers
On 2020/07/08 10:54, torikoshia wrote:
> Hi,
>
> The manual describes the size of pg_stat_activity.query
> as below:
>
> | By default the query text is truncated at 1024 characters;
>
> When considering multibyte characters, it seems more
> accurate to change the unit from "characters" to "bytes".
Agreed. Barring any objection, I will commit this patch.
For record, this change derived from the discussion about other patch [1].
Regards,
[1]
https://postgr.es/m/cd0e961fd42e5708fdea70f7420bf214@oss.nttdata.com
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [doc] modifying unit from characters to bytes
@ 2020-07-08 07:17 Daniel Gustafsson <daniel@yesql.se>
parent: Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Gustafsson @ 2020-07-08 07:17 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: torikoshia <torikoshia@oss.nttdata.com>; pgsql-hackers
> On 8 Jul 2020, at 04:25, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
> On 2020/07/08 10:54, torikoshia wrote:
>> Hi,
>> The manual describes the size of pg_stat_activity.query
>> as below:
>> | By default the query text is truncated at 1024 characters;
>> When considering multibyte characters, it seems more
>> accurate to change the unit from "characters" to "bytes".
>
> Agreed. Barring any objection, I will commit this patch.
+1 to commit this patch, following the link to track_activity_query_size it's
even specified to be bytes there. IIRC the NULL terminator is also included in
the 1024 bytes which prevents it from being 1024 characters even for
non-multibyte.
cheers ./daniel
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [doc] modifying unit from characters to bytes
@ 2020-07-08 08:05 Fujii Masao <masao.fujii@oss.nttdata.com>
parent: Daniel Gustafsson <daniel@yesql.se>
0 siblings, 1 reply; 7+ messages in thread
From: Fujii Masao @ 2020-07-08 08:05 UTC (permalink / raw)
To: Daniel Gustafsson <daniel@yesql.se>; +Cc: torikoshia <torikoshia@oss.nttdata.com>; pgsql-hackers
On 2020/07/08 16:17, Daniel Gustafsson wrote:
>> On 8 Jul 2020, at 04:25, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>>
>> On 2020/07/08 10:54, torikoshia wrote:
>>> Hi,
>>> The manual describes the size of pg_stat_activity.query
>>> as below:
>>> | By default the query text is truncated at 1024 characters;
>>> When considering multibyte characters, it seems more
>>> accurate to change the unit from "characters" to "bytes".
>>
>> Agreed. Barring any objection, I will commit this patch.
>
> +1 to commit this patch, following the link to track_activity_query_size it's
> even specified to be bytes there. IIRC the NULL terminator is also included in
> the 1024 bytes which prevents it from being 1024 characters even for
> non-multibyte.
Yes, so we should document "truncated at 1023 bytes" for accuracy, instead?
This might be more confusing for users, though....
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [doc] modifying unit from characters to bytes
@ 2020-07-08 08:12 Daniel Gustafsson <daniel@yesql.se>
parent: Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Gustafsson @ 2020-07-08 08:12 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: torikoshia <torikoshia@oss.nttdata.com>; pgsql-hackers
> On 8 Jul 2020, at 10:05, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>
> On 2020/07/08 16:17, Daniel Gustafsson wrote:
>>> On 8 Jul 2020, at 04:25, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>>>
>>> On 2020/07/08 10:54, torikoshia wrote:
>>>> Hi,
>>>> The manual describes the size of pg_stat_activity.query
>>>> as below:
>>>> | By default the query text is truncated at 1024 characters;
>>>> When considering multibyte characters, it seems more
>>>> accurate to change the unit from "characters" to "bytes".
>>>
>>> Agreed. Barring any objection, I will commit this patch.
>> +1 to commit this patch, following the link to track_activity_query_size it's
>> even specified to be bytes there. IIRC the NULL terminator is also included in
>> the 1024 bytes which prevents it from being 1024 characters even for
>> non-multibyte.
>
> Yes, so we should document "truncated at 1023 bytes" for accuracy, instead?
> This might be more confusing for users, though....
I think that's overcomplicating things, since we do (will) specify bytes and
not characters.
cheers ./daniel
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [doc] modifying unit from characters to bytes
@ 2020-07-09 04:47 Fujii Masao <masao.fujii@oss.nttdata.com>
parent: Daniel Gustafsson <daniel@yesql.se>
0 siblings, 1 reply; 7+ messages in thread
From: Fujii Masao @ 2020-07-09 04:47 UTC (permalink / raw)
To: Daniel Gustafsson <daniel@yesql.se>; +Cc: torikoshia <torikoshia@oss.nttdata.com>; pgsql-hackers
On 2020/07/08 17:12, Daniel Gustafsson wrote:
>> On 8 Jul 2020, at 10:05, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>>
>> On 2020/07/08 16:17, Daniel Gustafsson wrote:
>>>> On 8 Jul 2020, at 04:25, Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>>>>
>>>> On 2020/07/08 10:54, torikoshia wrote:
>>>>> Hi,
>>>>> The manual describes the size of pg_stat_activity.query
>>>>> as below:
>>>>> | By default the query text is truncated at 1024 characters;
>>>>> When considering multibyte characters, it seems more
>>>>> accurate to change the unit from "characters" to "bytes".
>>>>
>>>> Agreed. Barring any objection, I will commit this patch.
>>> +1 to commit this patch, following the link to track_activity_query_size it's
>>> even specified to be bytes there. IIRC the NULL terminator is also included in
>>> the 1024 bytes which prevents it from being 1024 characters even for
>>> non-multibyte.
>>
>> Yes, so we should document "truncated at 1023 bytes" for accuracy, instead?
>> This might be more confusing for users, though....
>
> I think that's overcomplicating things, since we do (will) specify bytes and
> not characters.
Agreed. So I pushed the proposed patch. Thanks!
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [doc] modifying unit from characters to bytes
@ 2020-07-09 12:59 torikoshia <torikoshia@oss.nttdata.com>
parent: Fujii Masao <masao.fujii@oss.nttdata.com>
0 siblings, 0 replies; 7+ messages in thread
From: torikoshia @ 2020-07-09 12:59 UTC (permalink / raw)
To: Fujii Masao <masao.fujii@oss.nttdata.com>; +Cc: Daniel Gustafsson <daniel@yesql.se>; pgsql-hackers
On 2020-07-09 13:47, Fujii Masao wrote:
> On 2020/07/08 17:12, Daniel Gustafsson wrote:
>>> On 8 Jul 2020, at 10:05, Fujii Masao <masao.fujii@oss.nttdata.com>
>>> wrote:
>>>
>>> On 2020/07/08 16:17, Daniel Gustafsson wrote:
>>>>> On 8 Jul 2020, at 04:25, Fujii Masao <masao.fujii@oss.nttdata.com>
>>>>> wrote:
>>>>>
>>>>> On 2020/07/08 10:54, torikoshia wrote:
>>>>>> Hi,
>>>>>> The manual describes the size of pg_stat_activity.query
>>>>>> as below:
>>>>>> | By default the query text is truncated at 1024 characters;
>>>>>> When considering multibyte characters, it seems more
>>>>>> accurate to change the unit from "characters" to "bytes".
>>>>>
>>>>> Agreed. Barring any objection, I will commit this patch.
>>>> +1 to commit this patch, following the link to
>>>> track_activity_query_size it's
>>>> even specified to be bytes there. IIRC the NULL terminator is also
>>>> included in
>>>> the 1024 bytes which prevents it from being 1024 characters even for
>>>> non-multibyte.
>>>
>>> Yes, so we should document "truncated at 1023 bytes" for accuracy,
>>> instead?
>>> This might be more confusing for users, though....
>>
>> I think that's overcomplicating things, since we do (will) specify
>> bytes and
>> not characters.
>
> Agreed. So I pushed the proposed patch. Thanks!
Thanks for applying!
Regards,
--
Atsushi Torikoshi
NTT DATA CORPORATION
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2020-07-09 12:59 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 01:54 [doc] modifying unit from characters to bytes torikoshia <torikoshia@oss.nttdata.com>
2020-07-08 02:25 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2020-07-08 07:17 ` Daniel Gustafsson <daniel@yesql.se>
2020-07-08 08:05 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2020-07-08 08:12 ` Daniel Gustafsson <daniel@yesql.se>
2020-07-09 04:47 ` Fujii Masao <masao.fujii@oss.nttdata.com>
2020-07-09 12:59 ` torikoshia <torikoshia@oss.nttdata.com>
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