Re: pg_class.reltuples of brin indexes - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: pg_class.reltuples of brin indexes
Date
Msg-id CAD21AoAA7+ETUJo=j2L8KAdKF8Q9_5uqwNx6H8rucFm6aRZSBA@mail.gmail.com
Whole thread Raw
In response to Re: pg_class.reltuples of brin indexes  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
On Tue, Mar 27, 2018 at 11:28 PM, Alvaro Herrera
<alvherre@alvh.no-ip.org> wrote:
> Tom Lane wrote:
>> Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
>> > I think number of index tuples makes sense, as long as that's what the
>> > costing needs. That is, it's up to the index AM to define it. But it
>> > clearly should not flap like this ...
>>
>> > And it's not just BRIN. This is what I get with a GIN index:
>>
>> Sounds like the same kind of thing we just fixed for SP-GiST :-(
>
> Most likely I modelled the BRIN code after GIN.
>

It's better to create a new index AM that estimates the number of
index tuples, and to update the index stats using that returned value?

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
Next
From: Haribabu Kommi
Date:
Subject: Re: [HACKERS] Pluggable storage