Removing <@ from contrib/intarray's GiST opclasses

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2020-08-02T17:37:39Z
Lists: pgsql-hackers

Attachments

As previously discussed at [1], contrib/intarray's GiST opclasses
do not index empty arrays in a useful way, meaning that
"indexedcol <@ something" has to do a full-index search to ensure
that it finds empty arrays, which such a query should always find.
We'd be better off to not consider <@ indexable at all by these
opclasses, but removing it has been problematic because of
dependencies [2].  Now that commit 9f9682783 is in, the dependency
problem is fixed, so here are a couple of patches to remove the
operator's opclass membership.

Patch 0001 is a minimal patch to just drop the opclass membership.
We could do that and stop there, but if we do, <@ searches will
continue to be slow until people think to update their extensions
(which pg_upgrade does nothing to encourage).  Alternatively,
we could replace the now-dead support code with something that
throws an error telling people to update the extension, as in 0002.

I'm honestly not sure whether 0002 is a good idea or not.  Thoughts?

			regards, tom lane

[1] https://www.postgresql.org/message-id/flat/458.1565114141%40sss.pgh.pa.us
[2] https://www.postgresql.org/message-id/flat/4578.1565195302%40sss.pgh.pa.us

Commits

  1. Remove <@ from contrib/intarray's GiST operator classes.

  2. Invent "amadjustmembers" AM method for validating opclass members.