Bug #493: corrupt pg_language_oid_index, (how to fix?) - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject Bug #493: corrupt pg_language_oid_index, (how to fix?)
Date
Msg-id 200110271607.f9RG72T49557@postgresql.org
Whole thread Raw
List pgsql-bugs
Jonathan Dugan (dugan@smi.stanford.edu) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
corrupt pg_language_oid_index, (how to fix?)

Long Description
it appears that pg_language_oid_index has been corrupted in some way, I first noticed that the vacuumdb command gave
this:

ERROR:  cannot find attribute 1 of relation pg_language_oid_index
vacuumdb: vacuum  iscb failed

a longer list of what version, and a walk through are below.  Any suggestions, please CC
dugan@smi.stanford.edu

I'm sorry, but  I don't have the bug template.  The DB has been working great for months, and the iscb db is still
workingnormally, it seems. 

Thanks,
Jon


Sample Code
platform Linux Mandrake 8

uname -a
Linux blah.Stanford.EDU 2.4.3-20mdksmp #1 SMP Sun Apr 15 22:32:27 CEST 2001 i686 unknown

rpm -qa | grep -i postgr
postgresql-libs-7.1.2-19mdk
postgresql-7.1.2-19mdk
postgresql-devel-7.1.2-19mdk
postgresql-server-7.1.2-19mdk
postgresql-contrib-7.1.2-19mdk


walk through of the problem (screen dump):

prompt> psql iscb
Welcome to psql, 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

iscb=# SELECT * from pg_
pg_aggregate    pg_attrdef      pg_description  pg_inherits     pg_listener     pg_relcheck     pg_trigger
pg_am           pg_attribute    pg_group        pg_ipl          pg_opclass      pg_rewrite      pg_type
pg_amop         pg_class        pg_index        pg_language     pg_operator     pg_shadow
pg_amproc       pg_database     pg_inheritproc  pg_largeobject  pg_proc         pg_statistic
iscb=# SELECT * from pg_language ;
ERROR:  cannot find attribute 1 of relation pg_language_oid_index
iscb=# VACUUM verbose;
NOTICE:  --Relation pg_type--
NOTICE:  Pages 2: Changed 0, reaped 1, Empty 0, New 0; Tup 128: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 14, MinLen 106,
MaxLen109; Re-using: Free/Avail. Space 1728/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.01u sec. 
NOTICE:  Index pg_type_oid_index: Pages 2; Tuples 128: Deleted 0. CPU 0.00s/0.00u sec.
NOTICE:  Index pg_type_typname_index: Pages 2; Tuples 128: Deleted 0. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_attribute--
NOTICE:  Pages 8: Changed 0, reaped 1, Empty 0, New 0; Tup 615: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 9, MinLen 98,
MaxLen98; Re-using: Free/Avail. Space 960/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_attribute_relid_attnam_index: Pages 13; Tuples 615: Deleted 0. CPU 0.00s/0.00u sec.
NOTICE:  Index pg_attribute_relid_attnum_index: Pages 6; Tuples 615: Deleted 0. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_class--
NOTICE:  Pages 2: Changed 0, reaped 1, Empty 0, New 0; Tup 84: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 49, MinLen 115,
MaxLen152; Re-using: Free/Avail. Space 5896/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_class_oid_index: Pages 2; Tuples 84: Deleted 0. CPU 0.00s/0.00u sec.
NOTICE:  Index pg_class_relname_index: Pages 4; Tuples 84: Deleted 0. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_group--
NOTICE:  Pages 0: Changed 0, reaped 0, Empty 0, New 0; Tup 0: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 0, MaxLen
0;Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_group_name_index: Pages 1; Tuples 0. CPU 0.00s/0.00u sec.
NOTICE:  Index pg_group_sysid_index: Pages 1; Tuples 0. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_database--
NOTICE:  Pages 1: Changed 0, reaped 1, Empty 0, New 0; Tup 5: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 4, MinLen 84, MaxLen
84;Re-using: Free/Avail. Space 7716/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  --Relation pg_attrdef--
NOTICE:  Pages 1: Changed 0, reaped 1, Empty 0, New 0; Tup 11: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 41, MinLen 149,
MaxLen149; Re-using: Free/Avail. Space 6292/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_attrdef_adrelid_index: Pages 2; Tuples 11: Deleted 0. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_toast_1215--
NOTICE:  Pages 0: Changed 0, reaped 0, Empty 0, New 0; Tup 0: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 0, MaxLen
0;Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_toast_1215_idx: Pages 1; Tuples 0. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_trigger--
NOTICE:  Pages 1: Changed 0, reaped 0, Empty 0, New 0; Tup 1: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 152,
MaxLen152; Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_trigger_tgconstrname_index: Pages 2; Tuples 1. CPU 0.00s/0.00u sec.
NOTICE:  Index pg_trigger_tgconstrrelid_index: Pages 2; Tuples 1. CPU 0.00s/0.00u sec.
NOTICE:  Index pg_trigger_tgrelid_index: Pages 2; Tuples 1. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_inherits--
NOTICE:  Pages 0: Changed 0, reaped 0, Empty 0, New 0; Tup 0: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 0, MaxLen
0;Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_inherits_relid_seqno_index: Pages 1; Tuples 0. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_index--
NOTICE:  Pages 1: Changed 0, reaped 1, Empty 0, New 0; Tup 42: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 6, MinLen 164,
MaxLen164; Re-using: Free/Avail. Space 1092/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_index_indrelid_index: Pages 2; Tuples 42: Deleted 0. CPU 0.00s/0.00u sec.
NOTICE:  Index pg_index_indexrelid_index: Pages 2; Tuples 42: Deleted 0. CPU 0.00s/0.01u sec.
NOTICE:  --Relation pg_operator--
NOTICE:  Pages 9: Changed 0, reaped 0, Empty 0, New 0; Tup 594: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 116,
MaxLen116; Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_operator_oid_index: Pages 4; Tuples 594. CPU 0.00s/0.00u sec.
NOTICE:  Index pg_operator_oprname_l_r_k_index: Pages 9; Tuples 594. CPU 0.01s/0.00u sec.
NOTICE:  --Relation pg_opclass--
NOTICE:  Pages 1: Changed 0, reaped 0, Empty 0, New 0; Tup 29: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 68,
MaxLen68; Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_opclass_deftype_index: Pages 2; Tuples 29. CPU 0.00s/0.00u sec.
NOTICE:  Index pg_opclass_name_index: Pages 2; Tuples 29. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_am--
NOTICE:  Pages 1: Changed 0, reaped 0, Empty 0, New 0; Tup 4: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 148,
MaxLen148; Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_am_name_index: Pages 2; Tuples 4. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_amop--
NOTICE:  Pages 2: Changed 0, reaped 0, Empty 0, New 0; Tup 169: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 46,
MaxLen46; Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  Index pg_amop_opid_index: Pages 2; Tuples 169. CPU 0.00s/0.00u sec.
NOTICE:  Index pg_amop_strategy_index: Pages 2; Tuples 169. CPU 0.00s/0.00u sec.
NOTICE:  --Relation pg_amproc--
NOTICE:  Pages 1: Changed 0, reaped 0, Empty 0, New 0; Tup 54: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 46,
MaxLen46; Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
NOTICE:  --Relation pg_language--
NOTICE:  Pages 1: Changed 0, reaped 0, Empty 0, New 0; Tup 3: Vac 0, Keep/VTL 0/0, Crash 0, UnUsed 0, MinLen 79, MaxLen
84;Re-using: Free/Avail. Space 0/0; EndEmpty/Avail. Pages 0/0. CPU 0.00s/0.00u sec. 
ERROR:  cannot find attribute 1 of relation pg_language_oid_index
iscb=# SELECT * from pg_language ;
ERROR:  cannot find attribute 1 of relation pg_language_oid_index
iscb=# \d pg_language
        Table "pg_language"
   Attribute   |  Type   | Modifier
---------------+---------+----------
 lanname       | name    |
 lanispl       | boolean |
 lanpltrusted  | boolean |
 lanplcallfoid | oid     |
 lancompiler   | text    |
Indices: pg_language_name_index,
         pg_language_oid_index%0

No file was uploaded with this report

pgsql-bugs by date:

Previous
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #493: corrupt pg_language_oid_index, (how to fix?)
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #493: corrupt pg_language_oid_index, (how to fix?)