Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtfnv-0003dB-GE for pgsql-general@arkaria.postgresql.org; Thu, 09 Jul 2020 23:18:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jtfnu-0005YL-Cr for pgsql-general@arkaria.postgresql.org; Thu, 09 Jul 2020 23:18:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtfnu-0005YE-4f for pgsql-general@lists.postgresql.org; Thu, 09 Jul 2020 23:18:10 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jtfnn-0001Rg-DI for pgsql-general@lists.postgresql.org; Thu, 09 Jul 2020 23:18:09 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 069NI0wF2012736; Thu, 9 Jul 2020 19:18:00 -0400 From: Tom Lane To: Michel Pelletier cc: pgsql-general Subject: Re: invalid non-zero objectSubId for object class In-reply-to: References: Comments: In-reply-to Michel Pelletier message dated "Thu, 09 Jul 2020 16:10:27 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2012734.1594336680.1@sss.pgh.pa.us> Date: Thu, 09 Jul 2020 19:18:00 -0400 Message-ID: <2012735.1594336680@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michel Pelletier writes: > On a 12.3 AWS RDS instance, I get the following error when trying to drop > either of two tables: > dev=> drop table current_flight; > ERROR: invalid non-zero objectSubId for object class 297108 > dev=> drop table flight; > ERROR: invalid non-zero objectSubId for object class 297108 This looks like corrupt data in pg_depend, specifically an entry or entries with classid or refclassid = 297108, which should not happen (the classid should always be the OID of one of a short list of system catalogs). You could try poking around in pg_depend to see if you can identify any obviously-bogus rows. No idea how it got that way. Have you had any database crashes or the like? regards, tom lane