From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 大塚憲司 <otsuka(dot)kenji(at)nttcom(dot)co(dot)jp>, pgsql-docs(at)postgresql(dot)org, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [DOCS] The number of bytes is stored in index_size of pgstatindex() ? |
Date: | 2016-02-18 19:10:55 |
Message-ID: | CAM3SWZRLfCayENUVE2SqyeAiYKLFO7a7cHK4YbJGj55ZQ2i35w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs pgsql-hackers |
On Thu, Feb 18, 2016 at 10:49 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Yeah, that seems a bit strange to me as well. Should we change it to
> count the root as an internal page, or is that going too far?
I think we should change it. It seems like a bug to me. I've had the
same point come up ("leaf-ness/internal-ness and root-ness are
orthogonal") a couple of times with Heikki over the years. I just
haven't used pgstattuple very much for some reason, and so didn't
catch it before now.
> Note that it's already the case that in a one-page index (root is also
> a leaf), the root will be included in the leaf_pages count. So it
> sure seems inconsistent that it's not included in the internal_pages
> count when it's not a leaf.
That's what I was thinking.
> Well, actually, since we don't have write lock on the index it'd be
> possible to see zero or multiple roots because the root's location
> changes. That's already mentioned in the documentation, if somewhat
> obliquely.
Ah, yes. Another consequence of going in physical order.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-02-18 19:33:10 | Re: [HACKERS] The number of bytes is stored in index_size of pgstatindex() ? |
Previous Message | Tom Lane | 2016-02-18 18:49:31 | Re: [HACKERS] The number of bytes is stored in index_size of pgstatindex() ? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-02-18 19:33:10 | Re: [HACKERS] The number of bytes is stored in index_size of pgstatindex() ? |
Previous Message | Tom Lane | 2016-02-18 18:49:31 | Re: [HACKERS] The number of bytes is stored in index_size of pgstatindex() ? |