Re: WIP: BRIN multi-range indexes
Tomas Vondra <tomas.vondra@2ndquadrant.com>
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Mark Dilger <hornschnorter@gmail.com>, pgsql-hackers@postgreSQL.org
Date: 2018-02-05T18:57:06Z
Lists: pgsql-hackers
Attachments
- 0001-Pass-all-keys-to-BRIN-consistent-function-at-once.patch (text/x-patch)
On 01/23/2018 10:07 PM, Tomas Vondra wrote: > > > On 01/23/2018 09:05 PM, Alvaro Herrera wrote: >> This stuff sounds pretty nice. However, have a look at this report: >> >> https://codecov.io/gh/postgresql-cfbot/postgresql/commit/2aa632dae3066900e15d2d42a4aad811dec11f08 >> >> it seems to me that the new code is not tested at all. Shouldn't you >> add a few more tests? >> > > I have a hard time reading the report, but you're right I haven't added > any tests for the new opclasses (bloom and minmax_multi). I agree that's > something that needs to be addressed. > >> I think 0004 should apply to unpatched master (except for the parts >> that concern files not in master); sounds like a good candidate for >> first apply. Then 0001, which seems mostly just refactoring. 0002 and >> 0003 are the really interesting ones (minus the code removed by >> 0004). >> > > That sounds like a reasonable plan. I'll reorder the patch series along > those lines in the next few days. > And here we go. Attached is a reworked patch series that moves the IS NULL tweak to the beginning of the series, and also adds proper regression tests both for the bloom and multi-minmax opclasses. I've simply copied the brin.sql tests and tweaked it for the new opclasses. I've also added a bunch of missing multi-minmax opclasses. At this point all data types that have minmax opclass should also have multi-minmax one, except for these types: * bytea * char * name * text * bpchar * bit * varbit The reason is that I'm not quite sure how to define the 'distance' function, which is needed when picking ranges to merge when building/updating the index. BTW while working on the regression tests, I've noticed that brin.sql fails to test a couple of minmax opclasses (e.g. abstime/reltime). Is that intentional or is that something we should fix eventually? regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
BRIN minmax-multi indexes
- ab596105b55f 14.0 landed
-
BRIN bloom indexes
- 77b88cd1bb90 14.0 landed
-
Support the old signature of BRIN consistent function
- a681e3c107aa 14.0 landed
-
Remove unnecessary pg_amproc BRIN minmax entries
- a68dfa27d42f 14.0 landed
-
Optimize allocations in bringetbitmap
- 8e4b332e88b8 14.0 landed
-
Move IS [NOT] NULL handling from BRIN support functions
- 72ccf55cb99c 14.0 landed
-
Pass all scan keys to BRIN consistent function at once
- a1c649d889bd 14.0 landed
-
Properly detoast data in brin_form_tuple
- d2d3a4bd33d2 9.5.24 landed
- bae31e75f777 9.6.20 landed
- 0b96fc977c5b 10.15 landed
- 895d0f0e8218 11.10 landed
- 8149e9f9a0d6 12.5 landed
- 6a7b55f3716f 13.1 landed
- 7577dd84807a 14.0 landed