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 1oOtqX-00062v-84 for pgsql-general@arkaria.postgresql.org; Fri, 19 Aug 2022 04:43:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oOtqV-0004Ul-9v for pgsql-general@arkaria.postgresql.org; Fri, 19 Aug 2022 04:42:59 +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 1oOtqU-0004Ua-VD for pgsql-general@lists.postgresql.org; Fri, 19 Aug 2022 04:42:58 +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 1oOtqK-0000m4-2c for pgsql-general@postgresql.org; Fri, 19 Aug 2022 04:42:58 +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 27J4giqS2927387; Fri, 19 Aug 2022 00:42:44 -0400 From: Tom Lane To: milist ujang cc: Julien Rouhaud , pgsql-general@postgresql.org Subject: Re: ERROR: catalog is missing 3 attribute(s) for relid 150243 In-reply-to: References: <20220819040234.ossib2ixphaolhz2@jrouhaud> Comments: In-reply-to milist ujang message dated "Fri, 19 Aug 2022 11:27:50 +0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2927385.1660884164.1@sss.pgh.pa.us> Date: Fri, 19 Aug 2022 00:42:44 -0400 Message-ID: <2927386.1660884164@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk milist ujang writes: > On Fri, Aug 19, 2022 at 11:02 AM Julien Rouhaud wrote: >> What it means is that you likely have data corruption. You could try >> to reindex pg_attribute and see if that fixes that specific problems, >> but even if it does you will have to investigate how data got >> corrupted, fix that root problem, and then try to check for other >> corrupted data or restore from a sane backup. > yes we have a problem with vm; suddenly restart without reason.... Ugh. > I've done reinding pg_class, pg_attribute, pg_constraint without luck. That was your only chance of an easy way out :-(. At this point you clearly have data corruption in one or more system catalogs, and there's no particular reason to think that the damage is only in the catalogs and not also in your user-data tables. If the data is worth a substantial amount of money to you, I'd recommend hiring a professional Postgres support company with experience in data recovery. You can find some links here: https://www.postgresql.org/support/professional_support/ Otherwise, restore from your latest backup, and resolve to get better at keeping backups, and ask some hard questions about the reliability of the storage stack you're sitting on. regards, tom lane