pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: FOUTE K. Jaurès <jauresfoute@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: PostgreSQL 12 - ERROR: invalid attribute number 2 for ad_user_pkey - Urgent
Date: Wed, 01 Sep 2021 11:46:41 -0400
Message-ID: <2077430.1630511201@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHQ1jfeMqfZh3-5tj1sCS68TGHits+NhdvMR+adsExMQ=LYN7Q@mail.gmail.com>
References: <CAHQ1jffggwjByBjkQzB5_UnzuppwXpt5NniZAmMj5Tvh2RDaOg@mail.gmail.com>
	<0ff189d1-4418-a33e-631e-f289db51ef10@aklaver.com>
	<CAHQ1jfeMqfZh3-5tj1sCS68TGHits+NhdvMR+adsExMQ=LYN7Q@mail.gmail.com>

=?UTF-8?Q?FOUTE_K=2E_Jaur=C3=A8s?= <jauresfoute@gmail.com> writes:
> For all table except the pg_catalo table.
> The dump on the database is not possible too. (pg_dump: error: invalid
> column numbering in table "xxxxxx")

It seems that pg_attribute is messed up.  If you are really lucky,
it might be only a problem in pg_attribute's indexes, in which case
reindexing pg_attribute would fix it.  However, I recommend proceeding
on the assumption that you have possibly-irrecoverable damage.  Before
you do ANYTHING, make a complete filesystem-level backup of the cluster
(stop the server, then do "tar cf backup.tar $PGDATA" or equivalent).

Even if reindexing pg_attribute seems to fix it, I'd counsel then doing
a pg_dump and restore, in hopes of curing any other problems that may
have stemmed from the same root cause.

Speaking of root cause, have you had any crashes lately?  Is your
Postgres up-to-date?  How about the underlying OS?

			regards, tom lane





view thread (12+ messages)  latest in thread

Message-ID: <2077430.1630511201@sss.pgh.pa.us>
Permalink:  ../2077430.1630511201@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2077430.1630511201@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, jauresfoute@gmail.com, adrian.klaver@aklaver.com
  Subject: Re: PostgreSQL 12 - ERROR: invalid attribute number 2 for ad_user_pkey - Urgent
  In-Reply-To: <2077430.1630511201@sss.pgh.pa.us>
  References: <CAHQ1jffggwjByBjkQzB5_UnzuppwXpt5NniZAmMj5Tvh2RDaOg@mail.gmail.com> <0ff189d1-4418-a33e-631e-f289db51ef10@aklaver.com> <CAHQ1jfeMqfZh3-5tj1sCS68TGHits+NhdvMR+adsExMQ=LYN7Q@mail.gmail.com> <2077430.1630511201@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