Re: pg_class.reltuples of brin indexes

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_class.reltuples of brin indexes
Date: 2023-12-31 05:35:48
Message-ID: ZZD9tHWV2L_8Kd1n@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 31, 2023 at 02:08:41AM +0100, Tomas Vondra wrote:
> 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.

FWIW, this area of the code rings a few bells:
https://www.postgresql.org/message-id/17787-b2dbe62bdfabd467@postgresql.org
https://www.postgresql.org/message-id/17205-42b1d8f131f0cf97@postgresql.org
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhang Mingli 2023-12-31 05:55:39 Re: Why do parallel scans require syncscans (but not really)?
Previous Message Matthias Kuhn 2023-12-31 05:08:04 Build versionless .so for Android