From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: John Naylor <john.naylor@enterprisedb.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: WIP: BRIN multi-range indexes
Date: Tue, 2 Mar 2021 20:44:14 -0300
Message-ID: <20210302234414.GA30716@alvherre.pgsql> (raw)
In-Reply-To: <b50e5c5d-4372-8aee-308c-09845c2c5f86@enterprisedb.com>
On 2021-Mar-03, Tomas Vondra wrote:
> 1) The 0001 patch allows passing of all scan keys to BRIN opclasses,
> which is needed for the minmax-multi to work. But it also modifies the
> existing opclasses (minmax and inclusion) to do this - but for those
> opclasses it does not make much difference, I think. Initially this was
> done because the patch did this for all opclasses, but then we added the
> detection based on number of parameters. So I wonder if we should just
> remove this, to make the patch a bit smaller. It'll also test the other
> code path (for opclasses without the last parameter).
I think it makes sense to just do them all in one pass. I think trying
to keep the old way working just because it's how it was working
previously does not have much benefit. I don't think we care about the
*patch* being small as much as the resulting *code* being as simple as
possible (but no simpler).
> 2) This needs bsearch_arg, but we only have that defined/used in
> extended_statistics_internal.h - it seems silly to include that here, as
> this has nothing to do with extended stats, so I simply added another
> prototype (which gets linked correctly). But, I suppose a better way
> would be to define our "portable" variant pg_bsearch_arg, next to
> pg_qsort etc.
Yeah, I think it makes sense to move bsearch_arg to a place where it's
more generally accesible (src/port/bsearch_arg.c I suppose), and make
both places use that.
--
Álvaro Herrera Valdivia, Chile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, tomas.vondra@enterprisedb.com, john.naylor@enterprisedb.com, pgsql-hackers@lists.postgresql.org
Subject: Re: WIP: BRIN multi-range indexes
In-Reply-To: <20210302234414.GA30716@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox