Re: WIP: BRIN multi-range indexes

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Mark Dilger <hornschnorter(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: BRIN multi-range indexes
Date: 2019-06-11 17:30:52
Message-ID: 20190611173052.eqdmtv272g2rpwfh@development
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 03, 2019 at 07:29:26AM +0300, Alexander Korotkov wrote:
>On Sun, Mar 3, 2019 at 12:25 AM Tomas Vondra
><tomas(dot)vondra(at)2ndquadrant(dot)com> wrote:
>> I've looked at that patch only very briefly so far, but I agree it's
>> likely a better solution than what my patch does at the moment (which I
>> agree is a misuse of the AM-level options). I'll take a closer look.
>>
>> I agree it makes sense to re-use that infrastructure for this patch, but
>> I'm hesitant to rebase it on top of that patch right away. Because it
>> would mean this thread dependent on it, which would confuse cputube,
>> make it bitrot faster etc.
>>
>> So I suggest we ignore this aspect of the patch for now, and let's talk
>> about the other bits first.
>
>Works for me. We don't need to make the whole work made by this patch
>to be dependent on opclass parameters. It's OK to ignore this aspect
>for now and come back when opclass parameters get committed.
>

Attached is this patch series, rebased on top of current master and the
opclass parameters patch [1]. I previously planned to keep those two
efforts separate for a while, but I decided to give it a try and the
breakage is fairly minor so I'll keep it this way - this patch has zero
chance of getting committed with the opclass parameters patch anyway.

Aside from rebase and changes due to adopting opclass parameters, the
patch is otherwise unchanged.

0001-0004 are just the opclass parameters patch series.

0005 adds opclass parameters to BRIN indexes (similarly to what the
preceding parts to for GIN/GiST indexes).

0006-0010 are the original patch series (BRIN tweaks, bloom and
multi-minmax) rebased and switched to opclass parameters.

So now, we can do things like this:

CREATE INDEX x ON t USING brin (
col1 int4_bloom_ops(false_positive_rate = 0.05),
col2 int4_minmax_multi_ops(values_per_range = 16)
) WITH (pages_per_range = 32);

and so on. I think the patch [1] works fine - I only have some minor
comments, that I'll post to that thread.

The other challenges (e.g. how to pick the values for opclass parameters
automatically, based on the data) are still open.

regards

[1] https://www.postgresql.org/message-id/flat/d22c3a18-31c7-1879-fc11-4c1ce2f5e5af%40postgrespro.ru

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
0001-Add-opclass-parameters-20190611.patch text/plain 41.7 KB
0002-Add-opclass-parameters-to-GiST-20190611.patch text/plain 13.7 KB
0003-Add-opclass-parameters-to-GIN-20190611.patch text/plain 15.2 KB
0004-Add-opclass-parameters-to-GiST-tsvector_ops-20190611.patch text/plain 31.7 KB
0005-Add-opclass-parameters-to-BRIN-20190611.patch text/plain 6.6 KB
0006-Pass-all-keys-to-BRIN-consistent-function-a-20190611.patch text/plain 20.9 KB
0007-Move-IS-NOT-NULL-checks-to-bringetbitmap-20190611.patch text/plain 9.9 KB
0008-Move-processing-of-NULLs-from-BRIN-support--20190611.patch text/plain 16.1 KB
0009-BRIN-bloom-indexes-20190611.patch text/plain 123.6 KB
0010-BRIN-multi-range-minmax-indexes-20190611.patch text/plain 198.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-06-11 17:57:16 Re: hyrax vs. RelationBuildPartitionDesc
Previous Message Andres Freund 2019-06-11 16:32:21 Re: Status of the table access method work