Re: [doc] modifying unit from characters to bytes - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: [doc] modifying unit from characters to bytes
Date
Msg-id 8f9844a7-9cae-87c8-6d8a-02db264f7915@oss.nttdata.com
Whole thread Raw
In response to Re: [doc] modifying unit from characters to bytes  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: [doc] modifying unit from characters to bytes
List 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



pgsql-hackers by date:

Previous
From: Juan José Santamaría Flecha
Date:
Subject: Re: TAP tests and symlinks on Windows
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: max_slot_wal_keep_size and wal_keep_segments