Re: [DOCS] The number of bytes is stored in index_size of pgstatindex() ?

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: [DOCS] The number of bytes is stored in index_size of pgstatindex() ?
Дата
Msg-id CAM3SWZRLfCayENUVE2SqyeAiYKLFO7a7cHK4YbJGj55ZQ2i35w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [DOCS] The number of bytes is stored in index_size of pgstatindex() ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [DOCS] The number of bytes is stored in index_size of pgstatindex() ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Feb 18, 2016 at 10:49 AM, Tom Lane <tgl@sss.pgh.pa.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [DOCS] The number of bytes is stored in index_size of pgstatindex() ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [DOCS] The number of bytes is stored in index_size of pgstatindex() ?