Re: WIP: BRIN multi-range indexes
John Naylor <john.naylor@enterprisedb.com>
From: John Naylor <john.naylor@enterprisedb.com>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-11-09T19:20:31Z
Lists: pgsql-hackers
On Mon, Nov 9, 2020 at 1:39 PM Tomas Vondra <tomas.vondra@enterprisedb.com> wrote: > > > While investigating the failures, I've tried increasing the values a > lot, without observing any measurable increase in runtime. IIRC I've > even used (10 * target_partlen) or something like that. That tells me > it's not very sensitive part of the code, so I'd suggest to simply use > something that we know is large enough to be safe. Okay, then it's not worth being clever. > For example, the largest bloom filter we can have is 32kB, i.e. 262kb, > at which point the largest gap is less than 95 (per the gap table). And > we may use up to BLOOM_MAX_NUM_PARTITIONS, so let's just use > BLOOM_MAX_NUM_PARTITIONS * 100 Sure. > FWIW I wonder if we should do something about bloom filters that we know > can get larger than page size. In the example I used, we know that > nbits=575104 is larger than page, so as the filter gets more full (and > thus more random and less compressible) it won't possibly fit. Maybe we > should reject that right away, instead of "delaying it" until later, on > the basis that it's easier to fix at CREATE INDEX time (compared to when > inserts/updates start failing at a random time). Yeah, I'd be inclined to reject that right away. > The problem with this is of course that if the index is multi-column, > this may not be strict enough (i.e. each filter would fit independently, > but the whole index row is too large). But it's probably better to do at > least something, and maybe improve that later with some whole-row check. A whole-row check would be nice, but I don't know how hard that would be. As a Devil's advocate proposal, how awful would it be to not allow multicolumn brin-bloom indexes? -- John Naylor 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