Search Postgresql Archives

Error: "catalog is missing 8 attribute(s) for relid 16683"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello..
I've got this error and I don't know how to fix it.
Since it's an production database , I can't drop & recreate it..  
 
Here are some infos below..
 
[root@gw gateway]# psql -U postgres  -h 127.0.0.1 template1
Welcome to psql 7.4.5, the PostgreSQL interactive terminal.
 
Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit
template1=# \dt
ERROR:  catalog is missing 8 attribute(s) for relid 16683
template1=# VACUUM FULL;
ERROR:  catalog is missing 3 attribute(s) for relid 16656
 
There is some data in pg_attribute :
template1=# select * from pg_attribute LIMIT 3;
 attrelid |   attname    | atttypid | attstattarget | attlen | attnum | attndims | attcacheoff | atttypmod | attbyval | attstorage | attisset | attalign | attnotnull | atthasdef | attisdropped | attislocal | attinhcount
----------+--------------+----------+---------------+--------+--------+----------+-------------+-----------+----------+------------+----------+----------+------------+-----------+--------------+------------+-------------
     1247 | typname      |       19 |            -1 |     64 |      1 |        0 |          -1 |        -1 | f        | p          | f        | i        | t          | f         | f            | t          |           0
     1247 | typnamespace |       26 |            -1 |      4 |      2 |        0 |          -1 |        -1 | t        | p          | f        | i        | t          | f         | f            | t          |           0
     1247 | typowner     |       23 |            -1 |      4 |      3 |        0 |          -1 |        -1 | t        | p          | f        | i        | t          | f         | f            | t          |           0
(3 rows)
 
but non for relid 16683
template1=# select * from pg_attribute where attrelid=16683;
 attrelid | attname | atttypid | attstattarget | attlen | attnum | attndims | attcacheoff | atttypmod | attbyval | attstorage | attisset | attalign | attnotnull | atthasdef | attisdropped | attislocal | attinhcount
----------+---------+----------+---------------+--------+--------+----------+-------------+-----------+----------+------------+----------+----------+------------+-----------+--------------+------------+-------------
(0 rows)
 
i've tried an pg_dump:
 
[root@gw gateway]# pg_dump -U mydata -h 127.0.0.1 mydata > data.sql
pg_dump: SQL command failed
pg_dump: Error message from server: ERROR:  catalog is missing 8 attribute(s) for relid 16683
pg_dump: The command was: SELECT (SELECT usename FROM pg_user WHERE usesysid = datdba) as dba, pg_encoding_to_char(encoding) as encoding, datpath FROM pg_database WHERE datname = 'mydata'
 
 
The table affected is pg_user:
 
[root@gw root]# oid2name -H 127.0.0.1 -U mydata -d mydata -o 16683
Tablename of oid 16683 from database "mydata":
---------------------------------
16683  = pg_user
[root@gw root]# oid2name -H 127.0.0.1 -U mydata -d mydata -o 16656
Tablename of oid 16656 from database "mydata":
---------------------------------
16656  = pg_toast_16384
[root@gw root]# oid2name -H 127.0.0.1 -U mydata -d mydata -o 16384
Tablename of oid 16384 from database "mydata":
---------------------------------
16384  = pg_attrdef
 
Any select from pg_user fails..
 
template1=# select * from pg_user;
ERROR:  catalog is missing 8 attribute(s) for relid 16683
 
Even after REINDEX
 
template1=# reindex table pg_attribute;
REINDEX
template1=# REINDEX INDEX pg_attribute_relid_attnum_index;
REINDEX

template1=# select * from pg_user;
ERROR:  catalog is missing 8 attribute(s) for relid 16683
 
 
Any ideeas ?
 
 
Thanks
    Alex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux