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 1jtW9R-000143-I3 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2020 12:59:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtW9N-0002zC-Q1 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2020 12:59:41 +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 1jtW9N-0002z5-J2 for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2020 12:59:41 +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 1jtW9K-0003sw-Cb for pgsql-hackers@postgresql.org; Thu, 09 Jul 2020 12:59:41 +0000 Received: from oss.nttdata.com (localhost [127.0.0.1]) by oss.nttdata.com (Postfix) with ESMTP id 48A436029A; Thu, 9 Jul 2020 21:59:32 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 09 Jul 2020 21:59:32 +0900 From: torikoshia To: Fujii Masao Cc: Daniel Gustafsson , pgsql-hackers@postgresql.org Subject: Re: [doc] modifying unit from characters to bytes In-Reply-To: <8f9844a7-9cae-87c8-6d8a-02db264f7915@oss.nttdata.com> References: <88056e7e-24a8-3beb-590d-03adeeb52111@oss.nttdata.com> <91282F61-9D45-45AC-8881-CCD15BD46246@yesql.se> <8f9844a7-9cae-87c8-6d8a-02db264f7915@oss.nttdata.com> Message-ID: <9eefa8b88d42516d2027ff359aca9cb6@oss.nttdata.com> X-Sender: torikoshia@oss.nttdata.com User-Agent: Roundcube Webmail/1.1.9 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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 >>> 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! Thanks for applying! Regards, -- Atsushi Torikoshi NTT DATA CORPORATION