diff --git a/contrib/btree_gin/expected/install_btree_gin.out b/contrib/btree_gin/expected/install_btree_gin.out
index 0fae4c5bfe0b4e61237834a47cfff750c8ffa72b..631a0df722208986d241a628fbc21737f6e11c6f 100644
--- a/contrib/btree_gin/expected/install_btree_gin.out
+++ b/contrib/btree_gin/expected/install_btree_gin.out
@@ -1 +1,9 @@
 CREATE EXTENSION btree_gin;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
diff --git a/contrib/btree_gin/sql/install_btree_gin.sql b/contrib/btree_gin/sql/install_btree_gin.sql
index 0fae4c5bfe0b4e61237834a47cfff750c8ffa72b..746e77654f808154caf5b9a634ff21824ed296c0 100644
--- a/contrib/btree_gin/sql/install_btree_gin.sql
+++ b/contrib/btree_gin/sql/install_btree_gin.sql
@@ -1 +1,6 @@
 CREATE EXTENSION btree_gin;
+
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
diff --git a/contrib/btree_gist/expected/init.out b/contrib/btree_gist/expected/init.out
index afe05346824f28ea6476824027da25b49d8c4f4b..ce4559d8b03fdcf00367f0fabfe08e03367c9dd7 100644
--- a/contrib/btree_gist/expected/init.out
+++ b/contrib/btree_gist/expected/init.out
@@ -1 +1,9 @@
 CREATE EXTENSION btree_gist;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
diff --git a/contrib/btree_gist/sql/init.sql b/contrib/btree_gist/sql/init.sql
index afe05346824f28ea6476824027da25b49d8c4f4b..a6d2cffc677e94b0e12812a6353ead3feb6c08d8 100644
--- a/contrib/btree_gist/sql/init.sql
+++ b/contrib/btree_gist/sql/init.sql
@@ -1 +1,6 @@
 CREATE EXTENSION btree_gist;
+
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
diff --git a/contrib/citext/expected/citext.out b/contrib/citext/expected/citext.out
index 1a1e6c82f77cd8982302d0e2efde29683eb5205b..bc5d92eb9178fff1f0072d994732d92a00b1c95f 100644
--- a/contrib/citext/expected/citext.out
+++ b/contrib/citext/expected/citext.out
@@ -2,6 +2,14 @@
 --  Test citext datatype
 --
 CREATE EXTENSION citext;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 -- Test the operators and indexing functions
 -- Test = and <>.
 SELECT 'a'::citext = 'a'::citext AS t;
diff --git a/contrib/citext/expected/citext_1.out b/contrib/citext/expected/citext_1.out
index 3331dbc2553c64c80f1c62567d6ffd5e1e0d896c..3d02d06b9c3967e6ffff0f58045e5c4687825657 100644
--- a/contrib/citext/expected/citext_1.out
+++ b/contrib/citext/expected/citext_1.out
@@ -2,6 +2,14 @@
 --  Test citext datatype
 --
 CREATE EXTENSION citext;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 -- Test the operators and indexing functions
 -- Test = and <>.
 SELECT 'a'::citext = 'a'::citext AS t;
diff --git a/contrib/citext/sql/citext.sql b/contrib/citext/sql/citext.sql
index a8024846635ca76a9292b77db3a3a6ad09d519a2..f70f9ebae98354a64c6c9b992c41ba8a6331f7ab 100644
--- a/contrib/citext/sql/citext.sql
+++ b/contrib/citext/sql/citext.sql
@@ -4,6 +4,11 @@
 
 CREATE EXTENSION citext;
 
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+
 -- Test the operators and indexing functions
 
 -- Test = and <>.
diff --git a/contrib/cube/expected/cube.out b/contrib/cube/expected/cube.out
index 095491fa0c1c7ffed2f469065b23c5cd6d7ea307..ada54b2885fd0b8101f220ca8f601db8c8caecd3 100644
--- a/contrib/cube/expected/cube.out
+++ b/contrib/cube/expected/cube.out
@@ -2,6 +2,14 @@
 --  Test cube datatype
 --
 CREATE EXTENSION cube;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 --
 -- testing the input and output functions
 --
diff --git a/contrib/cube/expected/cube_2.out b/contrib/cube/expected/cube_2.out
index eaeae45fca610369ea5ceb9a2d49fa533a03643c..c58614ef05f0e0e306f2d4eb52e3d59974e65cb3 100644
--- a/contrib/cube/expected/cube_2.out
+++ b/contrib/cube/expected/cube_2.out
@@ -2,6 +2,14 @@
 --  Test cube datatype
 --
 CREATE EXTENSION cube;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 --
 -- testing the input and output functions
 --
diff --git a/contrib/cube/sql/cube.sql b/contrib/cube/sql/cube.sql
index cc5a1ce458813fe4a8afc1db6e6bd73657382ec0..a61fba1ea8182b499a3c0f8becc5c5064abbd74f 100644
--- a/contrib/cube/sql/cube.sql
+++ b/contrib/cube/sql/cube.sql
@@ -4,6 +4,11 @@
 
 CREATE EXTENSION cube;
 
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+
 --
 -- testing the input and output functions
 --
diff --git a/contrib/hstore/expected/hstore.out b/contrib/hstore/expected/hstore.out
index 6773a2b72f3d80432f90398d48b390561097c8d9..f0d421602d5f01fd7a24aaa4ac9ef3ba490a11a8 100644
--- a/contrib/hstore/expected/hstore.out
+++ b/contrib/hstore/expected/hstore.out
@@ -1,4 +1,12 @@
 CREATE EXTENSION hstore;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 set escape_string_warning=off;
 --hstore;
 select ''::hstore;
diff --git a/contrib/hstore/sql/hstore.sql b/contrib/hstore/sql/hstore.sql
index 48514789e647c41fa5365e831627035fc9cd1565..d64b9f77c752d78ca23a418e6baad6523f5bf6d9 100644
--- a/contrib/hstore/sql/hstore.sql
+++ b/contrib/hstore/sql/hstore.sql
@@ -1,5 +1,10 @@
 CREATE EXTENSION hstore;
 
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+
 set escape_string_warning=off;
 
 --hstore;
diff --git a/contrib/intarray/expected/_int.out b/contrib/intarray/expected/_int.out
index 962e5c6a4b1ddae2cf7eaa4bf46f41877c45dcde..0a5dd463acb087180fa64a0d45c3bb2f39fc3d15 100644
--- a/contrib/intarray/expected/_int.out
+++ b/contrib/intarray/expected/_int.out
@@ -1,4 +1,12 @@
 CREATE EXTENSION intarray;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 SELECT intset(1234);
  intset 
 --------
diff --git a/contrib/intarray/sql/_int.sql b/contrib/intarray/sql/_int.sql
index f6fe2de55c587b7d0f3f89fb2af764f1deab291d..44e1a729b4f0dbf29d8b829d0b6c96b00897457e 100644
--- a/contrib/intarray/sql/_int.sql
+++ b/contrib/intarray/sql/_int.sql
@@ -1,5 +1,10 @@
 CREATE EXTENSION intarray;
 
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+
 SELECT intset(1234);
 SELECT icount('{1234234,234234}');
 SELECT sort('{1234234,-30,234234}');
diff --git a/contrib/isn/expected/isn.out b/contrib/isn/expected/isn.out
index 140bc866561479cf55bfa54f91c9b88c34d700f3..ef9d3a61e725b3853472f10e5f6fd64818360b80 100644
--- a/contrib/isn/expected/isn.out
+++ b/contrib/isn/expected/isn.out
@@ -2,6 +2,50 @@
 -- Test ISN extension
 --
 CREATE EXTENSION isn;
+-- Check whether any of our opclasses fail amvalidate
+-- ... they will, because of missing cross-type operators
+SELECT amname, opcname
+FROM (SELECT amname, opcname, opc.oid
+      FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+      WHERE opc.oid >= 16384
+      ORDER BY 1, 2 OFFSET 0) ss
+WHERE NOT amvalidate(oid);
+INFO:  btree operator family "isn_ops" is missing cross-type operator(s)
+INFO:  btree operator family "isn_ops" is missing cross-type operator(s)
+INFO:  btree operator family "isn_ops" is missing cross-type operator(s)
+INFO:  btree operator family "isn_ops" is missing cross-type operator(s)
+INFO:  btree operator family "isn_ops" is missing cross-type operator(s)
+INFO:  btree operator family "isn_ops" is missing cross-type operator(s)
+INFO:  btree operator family "isn_ops" is missing cross-type operator(s)
+INFO:  btree operator family "isn_ops" is missing cross-type operator(s)
+INFO:  hash operator family "isn_ops" is missing cross-type operator(s)
+INFO:  hash operator family "isn_ops" is missing cross-type operator(s)
+INFO:  hash operator family "isn_ops" is missing cross-type operator(s)
+INFO:  hash operator family "isn_ops" is missing cross-type operator(s)
+INFO:  hash operator family "isn_ops" is missing cross-type operator(s)
+INFO:  hash operator family "isn_ops" is missing cross-type operator(s)
+INFO:  hash operator family "isn_ops" is missing cross-type operator(s)
+INFO:  hash operator family "isn_ops" is missing cross-type operator(s)
+ amname |  opcname   
+--------+------------
+ btree  | ean13_ops
+ btree  | isbn13_ops
+ btree  | isbn_ops
+ btree  | ismn13_ops
+ btree  | ismn_ops
+ btree  | issn13_ops
+ btree  | issn_ops
+ btree  | upc_ops
+ hash   | ean13_ops
+ hash   | isbn13_ops
+ hash   | isbn_ops
+ hash   | ismn13_ops
+ hash   | ismn_ops
+ hash   | issn13_ops
+ hash   | issn_ops
+ hash   | upc_ops
+(16 rows)
+
 --
 -- test valid conversions
 --
diff --git a/contrib/isn/sql/isn.sql b/contrib/isn/sql/isn.sql
index 5ef6d8aa3bee25bf0f5ac497e2952da7afff0168..71577d5590f8703638e49f116e6d81acc3d9e28f 100644
--- a/contrib/isn/sql/isn.sql
+++ b/contrib/isn/sql/isn.sql
@@ -4,6 +4,15 @@
 
 CREATE EXTENSION isn;
 
+-- Check whether any of our opclasses fail amvalidate
+-- ... they will, because of missing cross-type operators
+SELECT amname, opcname
+FROM (SELECT amname, opcname, opc.oid
+      FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+      WHERE opc.oid >= 16384
+      ORDER BY 1, 2 OFFSET 0) ss
+WHERE NOT amvalidate(oid);
+
 --
 -- test valid conversions
 --
diff --git a/contrib/ltree/expected/ltree.out b/contrib/ltree/expected/ltree.out
index da6e39a785f18a3b5504f6ad60e2937240eb33ac..db52069c266b961316f3a3705b785f121e740c45 100644
--- a/contrib/ltree/expected/ltree.out
+++ b/contrib/ltree/expected/ltree.out
@@ -1,4 +1,12 @@
 CREATE EXTENSION ltree;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 SELECT ''::ltree;
  ltree 
 -------
diff --git a/contrib/ltree/sql/ltree.sql b/contrib/ltree/sql/ltree.sql
index 46cfa41a4195596ae8f3a151f94960473e042ba0..b4f62e3febbd103e0466590e62d37bbf56eaeb03 100644
--- a/contrib/ltree/sql/ltree.sql
+++ b/contrib/ltree/sql/ltree.sql
@@ -1,5 +1,10 @@
 CREATE EXTENSION ltree;
 
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+
 SELECT ''::ltree;
 SELECT '1'::ltree;
 SELECT '1.2'::ltree;
diff --git a/contrib/pg_trgm/expected/pg_trgm.out b/contrib/pg_trgm/expected/pg_trgm.out
index 9bc55f1d0d33e4d40d7ebd7a6e6f909022bfa254..f646cbf90af215509bb83176ba9e9073c21685df 100644
--- a/contrib/pg_trgm/expected/pg_trgm.out
+++ b/contrib/pg_trgm/expected/pg_trgm.out
@@ -1,4 +1,12 @@
 CREATE EXTENSION pg_trgm;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 select show_trgm('');
  show_trgm 
 -----------
diff --git a/contrib/pg_trgm/sql/pg_trgm.sql b/contrib/pg_trgm/sql/pg_trgm.sql
index 244946bb8db558ca0a450d327f58731b381f5d0e..34d0614edbca3cc97c0e282ca887dc3d32ec898d 100644
--- a/contrib/pg_trgm/sql/pg_trgm.sql
+++ b/contrib/pg_trgm/sql/pg_trgm.sql
@@ -1,5 +1,10 @@
 CREATE EXTENSION pg_trgm;
 
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+
 select show_trgm('');
 select show_trgm('(*&^$@%@');
 select show_trgm('a b c');
diff --git a/contrib/seg/expected/seg.out b/contrib/seg/expected/seg.out
index 1f82a4abb86337a8b3501e96948323980d1fb6aa..18010c4d5cf506d264cb62418e7d60077fb2a764 100644
--- a/contrib/seg/expected/seg.out
+++ b/contrib/seg/expected/seg.out
@@ -2,6 +2,14 @@
 --  Test seg datatype
 --
 CREATE EXTENSION seg;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 --
 -- testing the input and output functions
 --
diff --git a/contrib/seg/expected/seg_1.out b/contrib/seg/expected/seg_1.out
index 563c744b2d6584ede0a7e60b13a380c5078e8eca..566ce394ed0f4e2b1f970b85f16ab7c850fd6efb 100644
--- a/contrib/seg/expected/seg_1.out
+++ b/contrib/seg/expected/seg_1.out
@@ -2,6 +2,14 @@
 --  Test seg datatype
 --
 CREATE EXTENSION seg;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 --
 -- testing the input and output functions
 --
diff --git a/contrib/seg/sql/seg.sql b/contrib/seg/sql/seg.sql
index 7b7f138dbf68cf8009594953f58e2f34f180304d..aa9193147406d236bdb61839d877c4404da51f12 100644
--- a/contrib/seg/sql/seg.sql
+++ b/contrib/seg/sql/seg.sql
@@ -4,6 +4,11 @@
 
 CREATE EXTENSION seg;
 
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+
 --
 -- testing the input and output functions
 --
diff --git a/contrib/tsearch2/expected/tsearch2.out b/contrib/tsearch2/expected/tsearch2.out
index e84e4d27f213e23c422938fd80d5a98e0228273c..eef85ef09deb7c3adee9e31d9e190867c7664186 100644
--- a/contrib/tsearch2/expected/tsearch2.out
+++ b/contrib/tsearch2/expected/tsearch2.out
@@ -1,4 +1,12 @@
 CREATE EXTENSION tsearch2;
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+ amname | opcname 
+--------+---------
+(0 rows)
+
 --tsvector
 SELECT '1'::tsvector;
  tsvector 
diff --git a/contrib/tsearch2/sql/tsearch2.sql b/contrib/tsearch2/sql/tsearch2.sql
index 53e3073af45b062f986f7875c9641cba2e345b82..2c37c4a1dd23a18d5d80e7d190feedb6150940f1 100644
--- a/contrib/tsearch2/sql/tsearch2.sql
+++ b/contrib/tsearch2/sql/tsearch2.sql
@@ -1,5 +1,10 @@
 CREATE EXTENSION tsearch2;
 
+-- Check whether any of our opclasses fail amvalidate
+SELECT amname, opcname
+FROM pg_opclass opc LEFT JOIN pg_am am ON am.oid = opcmethod
+WHERE opc.oid >= 16384 AND NOT amvalidate(opc.oid);
+
 --tsvector
 SELECT '1'::tsvector;
 SELECT '1 '::tsvector;