Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJTHs-0001Bh-6Z for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Nov 2018 01:02:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gJTHo-0003HM-MJ for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Nov 2018 01:02:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJTHo-0003HE-FG for pgsql-hackers@lists.postgresql.org; Mon, 05 Nov 2018 01:02:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gJTHg-0007si-Ur for pgsql-hackers@lists.postgresql.org; Mon, 05 Nov 2018 01:02:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wA512PSk017189 for ; Sun, 4 Nov 2018 20:02:25 -0500 From: Tom Lane To: pgsql-hackers@lists.postgresql.org Subject: Unused entry in pg_opfamily MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17187.1541379745.1@sss.pgh.pa.us> Date: Sun, 04 Nov 2018 20:02:25 -0500 Message-ID: <17188.1541379745@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I happened to notice that the pg_opfamily entry with OID 4035 (jsonb_ops for GIST) is not referenced anywhere; apparently it was put in in anticipation of support that never materialized. We still pass make check-world if it's removed. Getting rid of it seems like a no-brainer, but it surprised me a bit that none of our automated crosschecks had noticed this. It looks like the reason is that all the amvalidate logic is driven off pg_opclass entries, and so an opfamily that contains no opclass is never examined. We should, therefore, at least add an oprsanity check for opfamilies without opclasses. I wonder how far it's worth going to check for other orphaned catalog entries. regards, tom lane