Re: [HACKERS] index fix report - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] index fix report
Date
Msg-id 35EEB083.1054D521@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] index fix report  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
> OK, everything is there now.

I did a CVSup, a cvs checkout into a new tree, and still see the same
problems. I'll bet that most of the symptoms in the regression tests are
due to the same thing, which seems to involve table munging of pg_class.
It looks like some tuples end up with leading garbage of some sort in
the first field: see the example below.

I'll try to distill this down to a simpler test case. If anyone has some
hints on where to look...

                       - Tom

regression=> select * from primary_tbl;
ERROR:  primary_tbl: Table does not exist.

regression=> select * from pg_class where relname = 'primary_tbl';

relname|reltype|relowner|relam|relpages|reltuples|relhasindex|relisshared|relkind|relnatts|relchecks|reltriggers|relhasrules|relacl

-------+-------+--------+-----+--------+---------+-----------+-----------+-------+--------+---------+-----------+-----------+------
(0 rows)

regression=> select * from pg_class where relname like '%primary_tbl%';
relname

|reltype|relowner|relam|relpages|reltuples|relhasindex|relisshared|relkind|relnatts|relchecks|reltriggers|relhasrules|relacl

----------------+-------+--------+-----+--------+---------+-----------+-----------+-------+--------+---------+-----------+-----------+------
primary_tbl     |      0|     500|    0|       0|        0|t
|f          |r      |       2|        0|          0|f          |
primary_tbl_pkey|      0|     500|  403|       2|     1024|f
|f          |i      |       2|        0|          0|f          |
(2 rows)

regression=> select * from pg_class where relname like 'primary_tbl%';

relname|reltype|relowner|relam|relpages|reltuples|relhasindex|relisshared|relkind|relnatts|relchecks|reltriggers|relhasrules|relacl

-------+-------+--------+-----+--------+---------+-----------+-----------+-------+--------+---------+-----------+-----------+------
(0 rows)

regression=> select * from pg_class where relname like '%primary_tbl';
relname

|reltype|relowner|relam|relpages|reltuples|relhasindex|relisshared|relkind|relnatts|relchecks|reltriggers|relhasrules|relacl

-----------+-------+--------+-----+--------+---------+-----------+-----------+-------+--------+---------+-----------+-----------+------
primary_tbl|      0|     500|    0|       0|        0|t
|f          |r      |       2|        0|          0|f          |
(1 row)

pgsql-hackers by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Re: [HACKERS] Adding PRIMARY KEY info
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] index fix report