Re: WIP: BRIN multi-range indexes
Tomas Vondra <tomas.vondra@enterprisedb.com>
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: John Naylor <john.naylor@enterprisedb.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-03-23T01:13:10Z
Lists: pgsql-hackers
Attachments
- 0001-fixup-opclass-storage-type-20210323.patch (text/x-patch)
I've pushed the first couple patches, reworking the BRIN interface and the two existing opclasses. Attached are are the remaining bits, implementing the two new opclasses. 0001 fixes the opckeytype I explained in the previous message. I'll start a new thread, so that it does not get buried in this thread. The 0002 and 0003 are the "main" patches, implementing all the stuff as in-core opclasses. These patches were reviewed multiple times before, no new changes. 0004 and 0005 are the patches moving the new opclasses to contrib. This should also undo the catversion and OID generation changes from 0002 and 0003, but I'll take care of that if we actually decide contrib is the right way. I kinda like it, if we can solve the two issues: 1) the opckeytype - I think this is a bug elsewhere, affecting any opclass created by CREATE OPERATOR CLASS and not by directly injecting the data into catalogs. I'll start a separate thread for that. 2) the pageinspect - Without knowing OID of the types used for summary, brin_page_items can't print info about the bloom filter, minmax-multi ranges, etc. Unfortunately, by moving the code to contrib we lose the static OID assignment. I think there are three solutions to this: a) Just use BYTEAOID, and accept that pageinspect prints just and incomprehensible stream of characters b) Use TypenameGetTypidExtended() to lookup the type by name. This is what the code does now, but I'm afraid this might have security issues due to search_path shenanigans. Base types can be created only by superusers, but it's possible to create a composite type, and confuse the lookup ... c) Don't bother passing OID, and instead pass a pointer to the output function directly. We'd need to extend BrinOpcInfo a bit, but that seems like the simplest solution. I think (b) is too dangerous/fragile, (a) is the simplest and (c) is a bit too invasive/ugly I think. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
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