pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Israr Khan <israr@amnex.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Subject: FATAL: cache lookup failed for relation 1247
Date: Wed, 11 Oct 2023 10:24:34 -0400
Message-ID: <583765.1697034274@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHADrdE+UR1n7NQCeAB5e17AZAA9veEkYxJ5X51UWyH542V=9w@mail.gmail.com>
References: <CAHADrdE+UR1n7NQCeAB5e17AZAA9veEkYxJ5X51UWyH542V=9w@mail.gmail.com>

Israr Khan <israr@amnex.com> writes:
> I am facing the postgresql database access issue after doing vacuum on a
> table.

There has to have been more to it than that.

> Error : FATAL: cache lookup failed for relation 1247

1247 is pg_type, so this looks like rather nasty catalog corruption.
If you're really lucky, this might just be a messed-up index for
pg_class, but I'm afraid this might be something that calls for
professional data recovery help (if the data in that database is
valuable enough to you to justify that).

In any case, your first move should be to stop the postmaster and
make a physical backup (e.g. with tar) of the data directory.
Then at least you can get back to where you are if recovery
attempts make things worse.

After that, see if you can connect to that DB with system indexes
disabled, and if so try to issue REINDEX TABLE pg_class.

There's some other helpful info at

https://wiki.postgresql.org/wiki/Corruption

			regards, tom lane





view thread (2+ messages)

Message-ID: <583765.1697034274@sss.pgh.pa.us>
Permalink:  ../583765.1697034274@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/583765.1697034274@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, israr@amnex.com
  Subject: Re: Subject: FATAL: cache lookup failed for relation 1247
  In-Reply-To: <583765.1697034274@sss.pgh.pa.us>
  References: <CAHADrdE+UR1n7NQCeAB5e17AZAA9veEkYxJ5X51UWyH542V=9w@mail.gmail.com> <583765.1697034274@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox