From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Geoghegan <pg@heroku.com>
Cc: 大塚憲司 <otsuka.kenji@nttcom.co.jp>
Cc: pgsql-docs@postgresql.org, Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] The number of bytes is stored in index_size of pgstatindex() ?
Date: Thu, 18 Feb 2016 18:06:32 -0500
Message-ID: <10683.1455836792@sss.pgh.pa.us> (raw)
In-Reply-To: <CAM3SWZTUNXgzCfVsYSFP44cRo4K-93BPDC+gEbm_WveFdTKmnA@mail.gmail.com>
References: <56C5B2C7.7010604@nttcom.co.jp>
<31925.1455817248@sss.pgh.pa.us>
<CAM3SWZQtQ2WDGRqa2g_dbfHuu9CebfWvJ_XpXggFoFG1mUYzXw@mail.gmail.com>
<377.1455818470@sss.pgh.pa.us>
<CAM3SWZT2UaCTqpd71uhUVQN7b7k4treyzGyQLpv4N=TYU=F7tg@mail.gmail.com>
<10922.1455821371@sss.pgh.pa.us>
<CAM3SWZRLfCayENUVE2SqyeAiYKLFO7a7cHK4YbJGj55ZQ2i35w@mail.gmail.com>
<12435.1455823990@sss.pgh.pa.us>
<13291.1455825152@sss.pgh.pa.us>
<CAM3SWZTUNXgzCfVsYSFP44cRo4K-93BPDC+gEbm_WveFdTKmnA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>
Peter Geoghegan <pg@heroku.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, pg@heroku.com, otsuka.kenji@nttcom.co.jp, pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] The number of bytes is stored in index_size of pgstatindex() ?
In-Reply-To: <10683.1455836792@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox