Re: Table corruption on drop

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Robert A. Weiler" <rweiler@perfectsense.com>
Cc: pgsql-bugs@postgresql.org
Date: 2001-01-01T23:56:15Z
Lists: pgsql-bugs
"Robert A. Weiler" <rweiler@perfectsense.com> writes:
> [rotweiler@pss5 schema]$ psql < postgresql.sql
> NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'domain_pkey' for table 'domain'
> NOTICE:  mdopen: couldn't open unique_id: No such file or directory
> NOTICE:  RelationIdBuildRelation: smgropen(unique_id): No such file or directory
> NOTICE:  mdopen: couldn't open unique_id: No such file or directory
> ERROR:  Relation 'domain' does not exist

Hmm.  This looks suspiciously like the sort of problems that arise if
you try to roll back a DROP TABLE, ie,

	begin;
	drop table foo;
	abort;

which leaves the catalog rows for 'foo' still valid, but the physical
file for it has already been deleted.

The script you show doesn't seem to do that, but I wonder whether it's
not related somehow.

This class of problems is (at long last) fixed for 7.1, but in prior
releases all we can say is "don't do that" :-(

			regards, tom lane