pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
FATAL:  catalog is missing attributes
5+ messages / 4 participants
[nested] [flat]

* FATAL:  catalog is missing attributes
@ 2006-04-23 20:10  Bruno Cortes <bcc@mail.pt>
  0 siblings, 1 reply; 5+ messages in thread

From: Bruno Cortes @ 2006-04-23 20:10 UTC (permalink / raw)
  To: pgsql-admin

Hi,

I was trying to make a dump from a database in postgresql 7.4.2-1. I was 
enable to do so because of a cache lookup problem.
To solve it, I enter the database as superuser and execute VACUUM ALL. 
This was even worse than the previous error. Right now I cannot enter 
the database neither make a dump. When I execute a command such as "psql 
-U postgres center-01" I get the error:
psql: FATAL:  catalog is missing 10 attribute(s) for relid 1262

Since the backup it too old, I must enter this production DB and extract 
the data but it is unavailable. I look at similar threads in the 
archives but all the solutions assume that it is possible to access the 
database and this is not my case.

Can anyone help on this?
Thanks in advance
Bruno Cortes



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

* Re: FATAL:  catalog is missing attributes
@ 2006-04-24 12:43  Alvaro Herrera <alvherre@commandprompt.com>
  parent: Bruno Cortes <bcc@mail.pt>
  0 siblings, 2 replies; 5+ messages in thread

From: Alvaro Herrera @ 2006-04-24 12:43 UTC (permalink / raw)
  To: Bruno Cortes <bcc@mail.pt>; +Cc: pgsql-admin

Bruno Cortes wrote:
> Hi,
> 
> I was trying to make a dump from a database in postgresql 7.4.2-1. I was 
> enable to do so because of a cache lookup problem.
> To solve it, I enter the database as superuser and execute VACUUM ALL. 
> This was even worse than the previous error. Right now I cannot enter 
> the database neither make a dump. When I execute a command such as "psql 
> -U postgres center-01" I get the error:
> psql: FATAL:  catalog is missing 10 attribute(s) for relid 1262

Sounds very much like you haven't been doing the required vacuum on all
system catalogs.  Look for "transaction Xid wraparound" for possible
suggestions.  For example look at

http://archives.postgresql.org/pgsql-bugs/2005-05/msg00079.php

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



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

* Re: FATAL:  catalog is missing attributes
@ 2006-04-24 21:46  Jim C. Nasby <jnasby@pervasive.com>
  parent: Alvaro Herrera <alvherre@commandprompt.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Jim C. Nasby @ 2006-04-24 21:46 UTC (permalink / raw)
  To: Bruno Cortes <bcc@mail.pt>; pgsql-admin

On Mon, Apr 24, 2006 at 08:43:26AM -0400, Alvaro Herrera wrote:
> Bruno Cortes wrote:
> > Hi,
> > 
> > I was trying to make a dump from a database in postgresql 7.4.2-1. I was 
> > enable to do so because of a cache lookup problem.
> > To solve it, I enter the database as superuser and execute VACUUM ALL. 
> > This was even worse than the previous error. Right now I cannot enter 
> > the database neither make a dump. When I execute a command such as "psql 
> > -U postgres center-01" I get the error:
> > psql: FATAL:  catalog is missing 10 attribute(s) for relid 1262
> 
> Sounds very much like you haven't been doing the required vacuum on all
> system catalogs.  Look for "transaction Xid wraparound" for possible
> suggestions.  For example look at
> 
> http://archives.postgresql.org/pgsql-bugs/2005-05/msg00079.php

Could this also be due to data corruption? From my limited understanding
of the relevant code in backend/utils/cache/relcache.c it seems this
error indicates that there's a mismatch between the number of columns
found in a tuple and what's supposed to be there according to the
catalog tables...
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461



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

* Re: FATAL: catalog is missing attributes
@ 2006-04-24 22:18  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Alvaro Herrera <alvherre@commandprompt.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Tom Lane @ 2006-04-24 22:18 UTC (permalink / raw)
  To: Alvaro Herrera <alvherre@commandprompt.com>; +Cc: Bruno Cortes <bcc@mail.pt>; pgsql-admin

Alvaro Herrera <alvherre@commandprompt.com> writes:
> Bruno Cortes wrote:
>> This was even worse than the previous error. Right now I cannot enter 
>> the database neither make a dump. When I execute a command such as "psql 
>> -U postgres center-01" I get the error:
>> psql: FATAL:  catalog is missing 10 attribute(s) for relid 1262

> Sounds very much like you haven't been doing the required vacuum on all
> system catalogs.

I don't think so --- that error is coming out of the relcache/syscache
layer, and that code uses SnapshotNow; so it's only going to care
whether the tuples are marked committed, not whether they've wrapped
around.

I'm afraid that Bruno has lost some pages of pg_attribute (eg, they went
to zeroes).  That's not too surprising given his previous reports
suggesting hardware problems.

If the pages in question held only rows for system catalogs then it
might be possible to copy correct values from elsewhere, but if they
held rows for user tables then he's got serious problems :-(.  My advice
would be to start thinking about restoring from backup.

			regards, tom lane



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

* Re: FATAL: catalog is missing attributes
@ 2006-04-25 09:00  Bruno Cortes <bcc@mail.pt>
  0 siblings, 0 replies; 5+ messages in thread

From: Bruno Cortes @ 2006-04-25 09:00 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bruno Cortes <bcc@mail.pt>; pgsql-admin

Yes I suppose that was the problem...the harwdare failure was responsible
for the corrupted pg_attribute.

But I was suprise because I had a RAID 0/1 and the data got corrupted on
the second disk as well.

I am now trying to restore things from last backup and transaction logs.

Thanks all.
Regards
Bruno Cortes

> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > Bruno Cortes wrote:
> >> This was even worse than the previous error. Right now I cannot enter 

> >> the database neither make a dump. When I execute a command such as
"psql 
> >> -U postgres center-01" I get the error:
> >> psql: FATAL:  catalog is missing 10 attribute(s) for relid 1262
> 
> > Sounds very much like you haven't been doing the required vacuum on all

> > system catalogs.
> 
> I don't think so --- that error is coming out of the relcache/syscache
> layer, and that code uses SnapshotNow; so it's only going to care
> whether the tuples are marked committed, not whether they've wrapped
> around.
> 
> I'm afraid that Bruno has lost some pages of pg_attribute (eg, they went
> to zeroes).  That's not too surprising given his previous reports
> suggesting hardware problems.
> 
> If the pages in question held only rows for system catalogs then it
> might be possible to copy correct values from elsewhere, but if they
> held rows for user tables then he's got serious problems :-(.  My advice
> would be to start thinking about restoring from backup.
> 
>			regards, tom lane
> 
-- 





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


end of thread, other threads:[~2006-04-25 09:00 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-23 20:10 FATAL:  catalog is missing attributes Bruno Cortes <bcc@mail.pt>
2006-04-24 12:43 ` Alvaro Herrera <alvherre@commandprompt.com>
2006-04-24 21:46   ` Jim C. Nasby <jnasby@pervasive.com>
2006-04-24 22:18   ` Re: FATAL: catalog is missing attributes Tom Lane <tgl@sss.pgh.pa.us>
2006-04-25 09:00 Re: FATAL: catalog is missing attributes Bruno Cortes <bcc@mail.pt>

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