Re: Building infrastructure for B-Tree deduplication that recognizes when opclass equality is also equivalence
Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
From: Anastasia Lubennikova <a.lubennikova@postgrespro.ru>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Antonin Houska <ah@cybertec.at>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-11-15T12:03:13Z
Lists: pgsql-hackers
Attachments
- v3-Opclass-bitwise-equality-0002.patch (text/x-patch) patch v3
- v3-Opclass-bitwise-equality-0001.patch (text/x-patch) patch v3
14.11.2019 0:25, Peter Geoghegan wrote: > On Mon, Oct 28, 2019 at 11:11 AM Anastasia Lubennikova > <a.lubennikova@postgrespro.ru> wrote: >> At first I implemented bitwise as default, because it is more common . >> Though, I agree that it's essential to avoid false positives here. >> The new version of the patch is attached. I also updated pg_dump. >> >> A few more open questions: >> 1) How to handle contrib modules that create new opclasses? >> Since default is 'not bitwise' it means that various operator classes >> created in extensions >> such as bloom, btree_gin and others, won't be able to take advantage of >> various optimizations >> that require the opclass to be BITWISE. > What optimizations? Do we anticipate that other index AMs will benefit > from BITWISE-ness? I was thinking of possible planner optimizations, that Tom mentioned up thread. Though, I don't have any specific examples. Anyway, we can implement support for user-defined opclasses later. >> 3) Current patch modifies regression test so that it checks CREATE >> OPCLASS BITWISE syntax. >> Is there anything else worth testing? As I see it, this patch is just >> about infrastructure changes, >> and more specific tests will be added by features that will implement >> further optimizations. > I think so too -- this is really about associating a single piece of > information with an operator class. Great. It seems that the patch is ready for commit. I attached new version with pg_opclass documentation update. One more thing I am uncertain about is array_ops. Arrays may contain bitwise and not bitwise element types. What is the correct value of opcisbitwise the array_ops itself? -- Anastasia Lubennikova Postgres Professional:http://www.postgrespro.com The Russian Postgres Company
Commits
-
Add equalimage B-Tree support functions.
- 612a1ab76724 13.0 landed
-
Make _bt_keep_natts_fast() use datum_image_eq().
- 1f55ebae2722 13.0 landed
-
Teach datum_image_eq() about cstring datums.
- 8c951687f58a 13.0 landed
-
Fix optimization of foreign-key on update actions
- 1ffa59a85cb4 12.0 cited
-
Support all SQL:2011 options for window frame clauses.
- 0a459cec96d3 11.0 cited
-
Create a "sort support" interface API for faster sorting.
- c6e3ac11b60a 9.2.0 cited