Re: pg_class.reltuples of brin indexes

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема Re: pg_class.reltuples of brin indexes
Дата
Msg-id c4fc89ba-fb87-25c9-6899-49e910a1602a@enterprisedb.com
обсуждение исходный текст
Ответ на Re: pg_class.reltuples of brin indexes  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: pg_class.reltuples of brin indexes  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On 11/21/23 21:48, Bruce Momjian wrote:
> On Tue, Mar 27, 2018 at 08:58:11PM +0900, Masahiko Sawada wrote:
>> ...
>>
>> If I understand correctly pg_class.reltuples of indexes should have
>> the number of index tuples but especially for brin indexes it would be
>> hard to estimate it in the analyze code. I thought that we can change
>> brinvacuumcleanup so that it returns the estimated number of index
>> tuples and do vac_update_relstats using that value but it would break
>> API contract. Better ideas?
> 
> I assume there is nothing to do on this issue.
> 

I'm not sure. I think the current behavior is (still) wrong - I just
rediscovered it during testing BRIN. I haven't checked, but I guess GIN
is still affected too.

What's not clear to me is if this is merely cosmetic issue (making
pg_class data confusing for people), or if it has some practical impact.
And I'm not sure there's a good way to improve this, except for some
basic guesswork. For BRIN I can imagine simply calculating the number of
page ranges (relpages / pages_per_range), but no idea about GIN.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Show WAL write and fsync stats in pg_stat_io
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Exclude generated wait_event files from pgindent