RE: [GENERAL] Thing that makes me go "Hmmm" - Mailing list pgsql-general

From boris@alum.mit.edu
Subject RE: [GENERAL] Thing that makes me go "Hmmm"
Date
Msg-id 14127.16430.353838.6956@griddle.infoplease.com
Whole thread Raw
List pgsql-general
>>>>> 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

pgsql-general by date:

Previous
From: Mike Haberman
Date:
Subject: subscribe
Next
From: Mike Haberman
Date:
Subject: ...