Unused entry in pg_opfamily

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Unused entry in pg_opfamily
Date: 2018-11-05 01:02:25
Message-ID: 17188.1541379745@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-11-05 01:12:35 Re: Unused entry in pg_opfamily
Previous Message Michael Paquier 2018-11-05 00:19:35 Re: Getting ERROR: could not open file "base/13164/t3_16388" with partition table with ON COMMIT