Re: [HACKERS] index fix report

David Hartwig <daveh@insightdist.com>

From: David Hartwig <daveh@insightdist.com>
To: "Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Cc: Bruce Momjian <maillist@candle.pha.pa.us>, hackers@postgreSQL.org
Date: 1998-09-03T15:13:43Z
Lists: pgsql-hackers
Tom, its in the index.   Do an explain before each of your queries.

Thomas G. Lockhart wrote:

> > 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)