[doc] modifying unit from characters to bytes

Started by torikoshiaover 5 years ago7 messages
#1torikoshia
torikoshia@oss.nttdata.com
1 attachment(s)

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.patchtext/x-diff; name=0001-modifying-unit-from-characters-to-bytes.patchDownload
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>
#2Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: torikoshia (#1)
Re: [doc] modifying unit from characters to bytes

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]/messages/by-id/cd0e961fd42e5708fdea70f7420bf214@oss.nttdata.com.

Regards,

[1]: /messages/by-id/cd0e961fd42e5708fdea70f7420bf214@oss.nttdata.com
/messages/by-id/cd0e961fd42e5708fdea70f7420bf214@oss.nttdata.com

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

#3Daniel Gustafsson
daniel@yesql.se
In reply to: Fujii Masao (#2)
Re: [doc] modifying unit from characters to bytes

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

#4Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: Daniel Gustafsson (#3)
Re: [doc] modifying unit from characters to bytes

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

#5Daniel Gustafsson
daniel@yesql.se
In reply to: Fujii Masao (#4)
Re: [doc] modifying unit from characters to bytes

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

#6Fujii Masao
masao.fujii@oss.nttdata.com
In reply to: Daniel Gustafsson (#5)
Re: [doc] modifying unit from characters to bytes

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

#7torikoshia
torikoshia@oss.nttdata.com
In reply to: Fujii Masao (#6)
Re: [doc] modifying unit from characters to bytes

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