Обсуждение: RE: [GENERAL] Thing that makes me go "Hmmm"

Поиск
Список
Период
Сортировка

RE: [GENERAL] Thing that makes me go "Hmmm"

От
boris@alum.mit.edu
Дата:
>>>>> Bruce Tong writes:

>> PostgreSQL wants to create a file for each table.

BT> /var/lib/pgsql/base/zztong/*

BT> There is a file there named "mytemp" but it is empty.

I've run into this situation before -- it appears to be a Postgres bug.
You start a command that creates a table, and cancel it, or it dies
for some external reason.  Sometimes you are left with an empty file
in the database directory, at which point (a) you cannot create a
table with that name, since it's apparently taken, and (b) you cannot
drop the table, because it doesn't really exist.

However, you CAN remove the empty file manually, and everything should
be well again (or at least, it has worked for me).

Apparently postgres misses a step of cleanup that it ought to do when
table-creating commands fail.

Bng