Re: Bloom index cost model seems to be wrong - Mailing list pgsql-performance

From Jeff Janes
Subject Re: Bloom index cost model seems to be wrong
Date
Msg-id CAMkU=1yHfC+Gu84UFsz4hWn=C7tgQFMLiEQcto1Y-8WDE96vaw@mail.gmail.com
Whole thread Raw
In response to Re: Bloom index cost model seems to be wrong  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On Tue, Feb 12, 2019 at 4:17 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Jeff Janes <jeff.janes@gmail.com> writes:
> In order for bloom (or any other users of CREATE ACCESS METHOD, if there
> are any) to have a fighting chance to do better, I think many of selfuncs.c
> currently private functions would have to be declared in some header file,
> perhaps utils/selfuncs.h.  But that then requires a cascade of other
> inclusions.  Perhaps that is why it was not done.

I'm just in the midst of refactoring that stuff, so if you have
suggestions, let's hear 'em.

The goal would be that I can copy the entire definition of genericcostestimate into blcost.c, change the function's name, and get it to compile.  I don't know the correct way accomplish that.  Maybe utils/selfuncs.h can be expanded to work, or if there should be a new header file like "utils/index_am_cost.h"

What I've done for now is: 

#include "../../src/backend/utils/adt/selfuncs.c"

which I assume is not acceptable as a real solution.


It's possible that a good cost model for bloom is so far outside
genericcostestimate's ideas that trying to use it is not a good
idea anyway.

I think that might be the case.  I don't know what the right answer would look like, but I think it will likely end up needing to access everything that genericcostestimate currently needs to access.  Or if bloom doesn't, some other extension implementing an ACCESS METHOD will.

Cheers,

Jeff

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bloom index cost model seems to be wrong
Next
From: Mariel Cherkassky
Date:
Subject: understanding max_wal_size,wal_keep_segments and checkpoints