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 1jt55Y-00006I-1g for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jul 2020 08:05:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jt55W-0001Qr-VN for pgsql-hackers@arkaria.postgresql.org; Wed, 08 Jul 2020 08:05:54 +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 1jt55W-0001Qk-OZ for pgsql-hackers@lists.postgresql.org; Wed, 08 Jul 2020 08:05:54 +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 1jt55T-0004vb-U8 for pgsql-hackers@postgresql.org; Wed, 08 Jul 2020 08:05:54 +0000 Received: from hnk.local (p2604028-ipngn12401funabasi.chiba.ocn.ne.jp [180.1.110.28]) by oss.nttdata.com (Postfix) with ESMTPSA id BDE3A6020F; Wed, 8 Jul 2020 17:05:47 +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: From: Fujii Masao Message-ID: <88056e7e-24a8-3beb-590d-03adeeb52111@oss.nttdata.com> Date: Wed, 8 Jul 2020 17:05:47 +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: 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 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.... Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION