CLUSTER makes table vanish :(

Started by Brian Martinover 25 years ago2 messagesbugs
Jump to latest
#1Brian Martin
brian@theory.org

Hi everybody,

I don't seem to have a copy of the bug template, so here goes.

In the process of trying to optimize some queries I'm doing, I
tried a CLUSTER command:

cluster track_instance_idx2 on track_instance;

It failed with this error:

ERROR: temp_258c0 is an index relation

Now I wasn't all that surprised because it was the first time I've
tried to use CLUSTER. The surprising thing is that after doing this,
the track_instance table vanished. Any reference to it gives me

ERROR: Relation 'track_instance' does not exist

This is somewhat troubling, as I'm lazy and don't have a recent dump handy.

it appears to have dissapeared from pg_tables:

djukebox=# select * from pg_tables where tablename = 'track_instance';
tablename | tableowner | hasindexes | hasrules | hastriggers
-----------+------------+------------+----------+-------------
(0 rows)

But is still in /usr/local/pgsql/data/base/djukebox:

garth:/usr/local/pgsql/data/base/djukebox# ls track_instance*
track_instance

So the file is still there, but none of my indices for that table are.
(They all started with track_instance as well).

Can anyone shed some light on this situation? I'm running pogstres 7.0.0
on a reasonably up to date debian gnu/linux system (2.2.16 kernel, libc 2.0.7,
etc).

thanks,
Brian

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Brian Martin (#1)
Re: CLUSTER makes table vanish :(

Brian Martin <brian@theory.org> writes:

Can anyone shed some light on this situation? I'm running pogstres 7.0.0

CLUSTER has got a lot of problems in 7.0.0 :-(. Try 7.0.2.

regards, tom lane