Skip site navigation (1) Skip section navigation (2)

Re: FATAL: catalog is missing 1 attribute(s) for relid

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: FATAL: catalog is missing 1 attribute(s) for relid
Date: 2005-01-15 19:54:11
Message-ID: 20050115154958.E16498@ganymede.hub.org (view raw or flat)
Thread:
Lists: pgsql-hackers
On Fri, 14 Jan 2005, Tom Lane wrote:

> "Marc G. Fournier" <scrappy(at)postgresql(dot)org> writes:
>> 'k, this is looking promising ... but I'm a bit confused on the TOAST
>> tables ... I can't match on 'relname', since they aren't the same ... the
>> old has, for instance:
>
>> pg_toast_5773565
>
>> while the new has:
>
>> pg_toast_8709712
>
>> is there some sort of 'linkage' in pg_class that I'm not seeing?
>
> Yeah.  A toast table's OID appears in the reltoastrelid field of its
> owning table.  So you match new and old pg_class entries by name,
> take their reltoastrelid fields, look up those rows by OID, and their
> relfilenode fields give the names of the TOAST files.

'k, there is somewhere else that is 'holding' the information ... the 
table in question is 'email' ... when I do a 'select, it tells me:

restore=# select * from email;
ERROR:  could not open relation with OID 5773277

which is the treltoastrelid from the old:

restore=# select reltoastrelid from npg_class where relname = 'email';
  reltoastrelid
---------------
        5773277
(1 row)

but, for the new, it should be:

restore=# select reltoastrelid from pg_class where relname = 'email';
  reltoastrelid
---------------
        8709051
(1 row)

Is there something in the 'table file' itself that is holding that relid? 
the only thing from the old, as far as system tables, taht I've copied 
over is the pg_class file into the npg_class relid, so I don't think 
there is anything else at the system catalog level that could 
inadvertantly contain it ...

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org           Yahoo!: yscrappy              ICQ: 7615664

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2005-01-15 19:58:31
Subject: Re: FATAL: catalog is missing 1 attribute(s) for relid 16396
Previous:From: Greg StarkDate: 2005-01-15 15:44:48
Subject: Re: sparse (static analyzer) report

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group