Re: Hypothetical indexes using BRIN broken since pg10

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Hypothetical indexes using BRIN broken since pg10
Date: 2019-06-27 18:32:56
Message-ID: CAOBaU_YrDOaz1-TGsaA2vgp4OfWYvavHP8BqC9ocMQdozBP1BA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 27, 2019 at 8:14 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>
> Hi, thanks for the patch.

Thanks for looking at it!

> On 2019-Jun-27, Julien Rouhaud wrote:
>
> > I just realized that 7e534adcdc7 broke support for hypothetical
> > indexes using BRIN am. Attached patch fix the issue.
> >
> > There's no interface to provide the hypothetical pagesPerRange value,
> > so I used the default one, and used simple estimates.
>
> I think it would look nicer to have a routine parallel to brinGetStats()
> (brinGetStatsHypothetical?), instead of polluting selfuncs.c with these
> gory details.

I'm not opposed to it, but I used the same approach as a similar fix
for gincostestimate() (see 7fb008c5ee5). If we add an hypothetical
version of brinGetStats(), we should also do it for ginGetStats().

> This seems back-patchable ...

I definitely hope so!

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2019-06-27 18:33:16 Re: pglz performance
Previous Message Tomas Vondra 2019-06-27 18:20:35 Re: Fix doc bug in logical replication.