Re: Hypothetical indexes using BRIN broken since pg10 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Hypothetical indexes using BRIN broken since pg10
Date
Msg-id 4079.1561661677@sss.pgh.pa.us
Whole thread Raw
In response to Re: Hypothetical indexes using BRIN broken since pg10  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Hypothetical indexes using BRIN broken since pg10
List pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2019-Jun-27, Julien Rouhaud wrote:
>> On Thu, Jun 27, 2019 at 8:14 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
>>> 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).

> How many #define lines did you have to add to selfuncs there?

FWIW, the proposed patch doesn't seem to me like it adds much more
BRIN-specific knowledge to brincostestimate than is there already.

I think a more useful response to your modularity concern would be
to move all the [indextype]costestimate functions out of the common
selfuncs.c file and into per-AM files.  I fooled around with that
while trying to refactor selfuncs.c back in February, but I didn't
come up with something that seemed clearly better.  Still, as we
move into a world with external index AMs, I think we're going to
have to make that happen eventually.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Erik Nordström
Date:
Subject: Missing hook for UPPERREL_PARTIAL_GROUP_AGG rels?
Next
From: Tom Lane
Date:
Subject: Re: Missing hook for UPPERREL_PARTIAL_GROUP_AGG rels?