Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qiPLZ-006Lj6-2E for pgsql-admin@arkaria.postgresql.org; Tue, 19 Sep 2023 01:16:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qiPLX-005A0y-Iz for pgsql-admin@arkaria.postgresql.org; Tue, 19 Sep 2023 01:16:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qiPLX-005A0k-7M for pgsql-admin@lists.postgresql.org; Tue, 19 Sep 2023 01:16:11 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qiPLU-005M62-B1 for pgsql-admin@lists.postgresql.org; Tue, 19 Sep 2023 01:16: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 38J1G5Ti263518; Mon, 18 Sep 2023 21:16:05 -0400 From: Tom Lane To: Matt Gibbins cc: pgsql-admin@lists.postgresql.org Subject: Re: Unable to drop extension dblink In-reply-to: <07dbf1c4-4871-4348-b41a-d0a800da7465@fastmail.com.au> References: <07dbf1c4-4871-4348-b41a-d0a800da7465@fastmail.com.au> Comments: In-reply-to Matt Gibbins message dated "Tue, 19 Sep 2023 08:04:33 +1000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <263516.1695086165.1@sss.pgh.pa.us> Date: Mon, 18 Sep 2023 21:16:05 -0400 Message-ID: <263517.1695086165@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Matt Gibbins writes: > In the process of removing extensions not required on the database I was > in the process of removing the dblink extension from the postgres database. > First attempt to drop the extension failed with 'ERROR: schema > "ag_catalog" does not exist'. Something is very broken there. I wonder if this error could be a corrupted reference to "pg_catalog" --- but I don't really see what the details could be, because we don't store schema references as textual names, rather OIDs. Your follow-on errors also look more like catalog corruption than anything sane. With only these limited factoids to look at, it's impossible to say just what's going on --- but creating bogus objects in response to these errors is unlikely to get you anywhere. What PG version is this, what's the installation's history, have you suffered any catastrophic failures in the recent past? regards, tom lane