Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1du9En-0006tn-0M for pgsql-performance@arkaria.postgresql.org; Tue, 19 Sep 2017 03:30:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1du9Em-0001kt-HK for pgsql-performance@arkaria.postgresql.org; Tue, 19 Sep 2017 03:30:16 +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_2) (envelope-from ) id 1du9D0-00071V-Lx for pgsql-performance@postgresql.org; Tue, 19 Sep 2017 03:28:26 +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_2) (envelope-from ) id 1du9Cw-0007tz-Tj for pgsql-performance@postgresql.org; Tue, 19 Sep 2017 03:28:26 +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 v8J3SJWC003950; Mon, 18 Sep 2017 23:28:20 -0400 From: Tom Lane To: Peter Geoghegan cc: Neto pr , postgres performance list Subject: Re: Pageinspect bt_metap help In-reply-to: References: Comments: In-reply-to Peter Geoghegan message dated "Mon, 18 Sep 2017 18:07:26 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3948.1505791699.1@sss.pgh.pa.us> Date: Mon, 18 Sep 2017 23:28:19 -0400 Message-ID: <3949.1505791699@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Peter Geoghegan writes: > On Mon, Sep 18, 2017 at 7:31 AM, Neto pr wrote: >> In my example, the values of fast_root, fast_root are equal to root, level, >> I believe that due to the newly created index and no delete operations >> occurred in the table. > Fast root and true root will probably never be different, even when > there are many deletions, including page deletions by VACUUM. As I > understand it, the fast root thing is for a fairly rare, though still > important edge case. It's a way of working around the fact that a > B-Tree can never become shorter due to the locking protocols not > allowing it. We can instead just pretend that it's shorter, knowing > that upper levels don't contain useful information. My (vague) recollection is that it's actually useful in cases where the live key-space constantly migrates to the right, so that the original upper-level key splits would become impossibly unbalanced. This isn't all that unusual a situation; consider timestamp keys for instance, in a table where old data gets flushed regularly. regards, tom lane -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance