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() ?
Дата
Msg-id 10922.1455821371@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [DOCS] The number of bytes is stored in index_size of pgstatindex() ?  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: [DOCS] The number of bytes is stored in index_size of pgstatindex() ?  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
Peter Geoghegan <pg@heroku.com> writes:
> That's odd. Having taken a quick look at pgstatindex_impl(), I dislike
> that it counts the root separately from internal pages. That's not how
> they're actually presented and understood in the code.

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?

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.

> It's also possible to have more than one root page, since we do a scan
> in physical order, which the code considers. There could be a fast
> root and a true root. Looks like one is counted as deleted, though:

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.

            regards, tom lane


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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: 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() ?