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 1ll0T7-0007N7-1X for pgsql-docs@arkaria.postgresql.org; Mon, 24 May 2021 02:37:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ll0T4-0003VM-Vx for pgsql-docs@arkaria.postgresql.org; Mon, 24 May 2021 02:37:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ll0T4-0003VE-Lp for pgsql-docs@lists.postgresql.org; Mon, 24 May 2021 02:37:22 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ll0Sx-0006nr-QY for pgsql-docs@lists.postgresql.org; Mon, 24 May 2021 02:37:21 +0000 Received: from [192.168.0.6] (124-144-135-173.rev.home.ne.jp [124.144.135.173]) by oss.nttdata.com (Postfix) with ESMTPSA id A890661902; Mon, 24 May 2021 11:37:09 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.2 at oss.nttdata.com Subject: Re: more detailed description of tup_returned and tup_fetched To: Fujii Masao , pgsql-docs@lists.postgresql.org References: <9eeeccdb-5dd7-90f9-2807-a4b5d2b76ca3@oss.nttdata.com> <19f98fd2-c81b-f77f-d940-2816c565f850@oss.nttdata.com> <03d26cbe-cce3-5cdf-89e6-df3769ff7728@oss.nttdata.com> <14c6b74b-bb73-f8eb-3ce7-3e903e651bd3@oss.nttdata.com> <733bdf4a-e888-41df-0437-6dfb922d4883@oss.nttdata.com> <4a7fe815-7d79-aff9-19d8-ede4d0f1c10d@oss.nttdata.com> From: Masahiro Ikeda Message-ID: Date: Mon, 24 May 2021 11:37:09 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021/05/21 22:26, Fujii Masao wrote: > > > On 2021/05/20 17:38, Masahiro Ikeda wrote: >> >> >> On 2021/05/20 17:00, Fujii Masao wrote: >>> On 2021/05/20 9:46, Masahiro Ikeda wrote: >>>> On 2021/05/18 20:10, Fujii Masao wrote: >>>>>>> pg_stat_database.tup_fetched: >>>>>>> Number of index entries returned by scans on indexes in this database >>>>>> Is this the sum of pg_stat_all_indexes.idx_tup_read? This is accounted to >>>>>> pg_stat_database.tup_returned. >>>>> >>>>> I was thinking that pg_stat_database.tup_fetched is the same as >>>>> the sum of pg_stat_all_tables.idx_tup_fetch. Because they both >>>>> are incremented by bitmap index scans, but pg_stat_all_indexes.idx_tup_read >>>>> is not. >>>> >>>> Yes. So, "Number of index entries returned by scans on indexes in this >>>> database" is incorrect, and "Number of live rows fetched by index scans in >>>> this database" is correct? >>> >>> Yes, I think so! >> >> Thanks! >> I updated the patch for summarizing this thread. > > Thanks for updating the patch! LGTM. > > This is an improvement of documentation, so this should be applied in > v15 dev cycle? If so, could you add the patch to the next CF? Or you think > this is a bug fix and needs to be back-patched? Thanks for checking the patch! I thought this patch will be applied in V15 dev cycle. OK. I added the patch to the next CF. https://commitfest.postgresql.org/33/3130/ Regards, -- Masahiro Ikeda NTT DATA CORPORATION