Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtOYT-0000E6-JE for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2020 04:53:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtOTA-0006GT-73 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2020 04:47:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtOTA-0006GM-0S for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2020 04:47:36 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtOT6-0007gY-Sa for pgsql-hackers@postgresql.org; Thu, 09 Jul 2020 04:47:35 +0000 Received: from hnk.local (p2604028-ipngn12401funabasi.chiba.ocn.ne.jp [180.1.110.28]) by oss.nttdata.com (Postfix) with ESMTPSA id A0EF66003F; Thu, 9 Jul 2020 13:47:27 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: [doc] modifying unit from characters to bytes To: Daniel Gustafsson Cc: torikoshia , pgsql-hackers@postgresql.org References: <88056e7e-24a8-3beb-590d-03adeeb52111@oss.nttdata.com> <91282F61-9D45-45AC-8881-CCD15BD46246@yesql.se> From: Fujii Masao Message-ID: <8f9844a7-9cae-87c8-6d8a-02db264f7915@oss.nttdata.com> Date: Thu, 9 Jul 2020 13:47:27 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <91282F61-9D45-45AC-8881-CCD15BD46246@yesql.se> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020/07/08 17:12, Daniel Gustafsson wrote: >> On 8 Jul 2020, at 10:05, Fujii Masao wrote: >> >> On 2020/07/08 16:17, Daniel Gustafsson wrote: >>>> On 8 Jul 2020, at 04:25, Fujii Masao 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