Re: Hypothetical indexes using BRIN broken since pg10

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Hypothetical indexes using BRIN broken since pg10
Date: 2019-06-27 19:16:59
Message-ID: 20190627191659.GA716@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-Jun-27, Tom Lane wrote:

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

It's this calculation that threw me off:
statsData.revmapNumPages = (indexRanges / REVMAP_PAGE_MAXITEMS) + 1;
ISTM that selfuncs has no reason to learn about revmap low-level
details.

> 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.

Yeah, that would be nice, but then I'm not going to push Julien to do
that to fix just this one problem; and on the other hand, that's even
less of a back-patchable fix.

> 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.

No disagreement.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-06-27 19:22:00 Re: Hypothetical indexes using BRIN broken since pg10
Previous Message Tom Lane 2019-06-27 18:58:53 Re: Missing hook for UPPERREL_PARTIAL_GROUP_AGG rels?