Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aWXeh-00033j-By for pgsql-docs@arkaria.postgresql.org; Thu, 18 Feb 2016 23:06:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aWXeg-0007dE-Pn for pgsql-docs@arkaria.postgresql.org; Thu, 18 Feb 2016 23:06:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWXef-0007aM-QY; Thu, 18 Feb 2016 23:06:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWXed-0001Kc-BL; Thu, 18 Feb 2016 23:06:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u1IN6WLR010684; Thu, 18 Feb 2016 18:06:32 -0500 From: Tom Lane To: Peter Geoghegan cc: =?UTF-8?B?5aSn5aGa5oay5Y+4?= , pgsql-docs@postgresql.org, Pg Hackers Subject: Re: [HACKERS] The number of bytes is stored in index_size of pgstatindex() ? In-reply-to: References: <56C5B2C7.7010604@nttcom.co.jp> <31925.1455817248@sss.pgh.pa.us> <377.1455818470@sss.pgh.pa.us> <10922.1455821371@sss.pgh.pa.us> <12435.1455823990@sss.pgh.pa.us> <13291.1455825152@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Thu, 18 Feb 2016 14:56:58 -0800" Date: Thu, 18 Feb 2016 18:06:32 -0500 Message-ID: <10683.1455836792@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Peter Geoghegan writes: > I think that the P_ISLEAF() instrumentation of free space and > fragments might still need to happen for deleted and/or half dead > pages. Don't see why; the documentation and field names clearly imply that those numbers are accumulated only over leaf pages. I certainly wouldn't expect the fragmentation measure to include dead pages, for example, since they would not get traversed by scans. (Whether the "rightlink points to a higher page number" rule for fragmentation is actually very useful is a separate question; but as long as that's the measure, only pages that are part of the leaf scan sequence should count.) > Having looked at the 2008 commit d287818eb514d431 myself, ISTM > that your intent might well have been to have that happen -- why else > would any reasonable person have changed the order at all? My best guess is that I was thinking that the tests were independent, and rearranged them so that the most common case would be tested first. I'm quite sure I didn't intend to change the statistical behavior, else I would have updated docs and/or mentioned it in the commit message. regards, tom lane -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs