Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aWZKf-0007HS-U9 for pgsql-docs@arkaria.postgresql.org; Fri, 19 Feb 2016 00:54:06 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aWZKf-0006Lx-7N for pgsql-docs@arkaria.postgresql.org; Fri, 19 Feb 2016 00:54:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWZKe-0006LK-C3; Fri, 19 Feb 2016 00:54:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aWZKa-0004L8-Vm; Fri, 19 Feb 2016 00:54:03 +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 u1J0rrAj015136; Thu, 18 Feb 2016 19:53:53 -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> <10683.1455836792@sss.pgh.pa.us> <13781.1455840922@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Thu, 18 Feb 2016 16:29:31 -0800" Date: Thu, 18 Feb 2016 19:53:53 -0500 Message-ID: <15135.1455843233@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: > On Thu, Feb 18, 2016 at 4:15 PM, Tom Lane wrote: >> Because they've been removed from the right-link/left-link chains. > That isn't the same thing as being inaccessible by scans, clearly > (just what you call the "leaf scan sequence"). Only a physical-order scan, ie vacuum, would visit a dead page (ignoring transient corner cases like a page getting deleted while an indexscan is in flight to it). So I think treating it as part of the fragmentation measure is completely wrong: the point of that measure, AFAICS, is to model how close an index-order traversal is to linear. Half-dead pages are also normally very transient --- the only way they persist is if there's a crash partway through a page deletion. So I think it's appropriate to assume that future indexscans won't visit those, either. > there are usage patterns where half-dead pages might accumulate. Other than a usage pattern of "randomly SIGKILL backends every few seconds", I don't see how that would happen. 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