pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_class corrupted ?
4+ messages / 2 participants
[nested] [flat]

* pg_class corrupted ?
@ 2004-06-17 12:05 Bruno THOMAS <bthomas@alea.fr>
  2004-06-18 15:52 ` Re: pg_class corrupted ? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Bruno THOMAS @ 2004-06-17 12:05 UTC (permalink / raw)
  To: pgsql-admin

Hi all,


After a severe HD crash and the impossibility to read old DAT with our 
new DAT drive, I've been able to copy $PGDATA/base/mabase on a new HD. 
I've found all the tables data, and even the java intranet based on it 
is working fine.

My problem is that when I tried to make a dump of the copied DB for a 
new backup I've had the following error :
pg_dump: query to obtain list of tables failed: ERROR:  Relation 
pg_class does not have attribute 1

I can run psql but \dt causes this error :
ERROR:  Relation pg_class does not have attribute 3

I can make a select * from pg_class but when I select a column from it 
(i.e. 'select relname from pg_class'), I have the error again :
ERROR:  Relation pg_class does not have attribute 1.

As I'm not a specialist, I can't find a solution or workaround for this 
problem, I've not been able to find a solution on the net or forums. 
Anybody has an idea ?

Thanks.

Bruno Thomas

PS: postresql version is 7.2.1




^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_class corrupted ?
  2004-06-17 12:05 pg_class corrupted ? Bruno THOMAS <bthomas@alea.fr>
@ 2004-06-18 15:52 ` Tom Lane <tgl@sss.pgh.pa.us>
  2004-06-18 18:26   ` Re: pg_class corrupted ? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2004-06-18 15:52 UTC (permalink / raw)
  To: Bruno THOMAS <bthomas@alea.fr>; +Cc: pgsql-admin

Bruno THOMAS <bthomas@alea.fr> writes:
> My problem is that when I tried to make a dump of the copied DB for a 
> new backup I've had the following error :
> pg_dump: query to obtain list of tables failed: ERROR:  Relation 
> pg_class does not have attribute 1

Reindexing pg_class might help.  Read the reindex man page carefully,
because reindexing system tables is a tricky procedure before 7.4.

> PS: postresql version is 7.2.1

You like to live dangerously, eh?  There are several known serious
bugs in 7.2.1.  If you want to stay on the 7.2 series you should
at least update to 7.2.4 (or whatever the last of that series was).

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_class corrupted ?
  2004-06-17 12:05 pg_class corrupted ? Bruno THOMAS <bthomas@alea.fr>
  2004-06-18 15:52 ` Re: pg_class corrupted ? Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-06-18 18:26   ` Tom Lane <tgl@sss.pgh.pa.us>
  2004-06-22 17:44     ` Re: pg_class corrupted ? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 4+ messages in thread

From: Tom Lane @ 2004-06-18 18:26 UTC (permalink / raw)
  To: Bruno THOMAS <bthomas@alea.fr>; +Cc: pgsql-admin

I wrote:
> Bruno THOMAS <bthomas@alea.fr> writes:
>> My problem is that when I tried to make a dump of the copied DB for a 
>> new backup I've had the following error :
>> pg_dump: query to obtain list of tables failed: ERROR:  Relation 
>> pg_class does not have attribute 1

> Reindexing pg_class might help.

On second thought, that symptom sounds more like a problem in the
pg_attribute indexes.  Probably what you want to do is REINDEX DATABASE
to force recreation of all the system-table indexes ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: pg_class corrupted ?
  2004-06-17 12:05 pg_class corrupted ? Bruno THOMAS <bthomas@alea.fr>
  2004-06-18 15:52 ` Re: pg_class corrupted ? Tom Lane <tgl@sss.pgh.pa.us>
  2004-06-18 18:26   ` Re: pg_class corrupted ? Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-06-22 17:44     ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2004-06-22 17:44 UTC (permalink / raw)
  To: Bruno THOMAS <bthomas@alea.fr>; +Cc: pgsql-admin

Bruno THOMAS <bthomas@alea.fr> writes:
> Thank you for your answers. I tried (after having shut down postmaster 
> and started standalone backend) to reindex pg_class but it complains :
> NOTICE:  table "pg_class" wasn't reindexed

> So I tried as you told me, to reindex database, but it answsers :
> ERROR:  catalog is missing 3 attributes for relid 1261
> This is the cause of all my troubles I think.

Did you run the standalone backend with the right options?  (From
memory, -O -P, but check the manual.)

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2004-06-22 17:44 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-17 12:05 pg_class corrupted ? Bruno THOMAS <bthomas@alea.fr>
2004-06-18 15:52 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-06-18 18:26   ` Tom Lane <tgl@sss.pgh.pa.us>
2004-06-22 17:44     ` Tom Lane <tgl@sss.pgh.pa.us>

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