Table file *disappears* when error occurs

From: Joachim Breuer <jmbreuer(at)iconsult(dot)com>
To: bugs(at)postgresql(dot)org
Cc: hakan(at)iconsult(dot)com, froh(at)iconsult(dot)com
Subject: Table file *disappears* when error occurs
Date: 1999-11-17 19:14:27
Message-ID: wwsvh713p7w.fsf@pong.iconsult.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello!

We experience the following problems with the RPMs of PostgreSQL that
come with RedHat 6.1 (I think, version is postgresql-server-6.5.2-1)
when doing something like the following sequence from java/jdbc:

<table thisisalongname_withsuffix exists>
BEGIN WORK
DROP TABLE thisisalongname_withsuffix
CREATE TABLE thisisalongname_withsuffix ( <tablespec> )
<prepare statement INSERT INTO thisisalongname_withsuffix (key, val1,
val2, val3, ...) VALUES (?, ?, ?, ...)>
for (...) {
set specific values into prepared statement
execute prepared statement
[one of these fails with]
}

The first failing insert statement fails for reasons you just cannot
teach to windows users writing tabular files:
ERROR: Bad int8 external representation ''

After this, the file used for storing records of this table
(/var/lib/pgsql/base/dbname/tablename) has disappeared, all further
accesses to the the table yield the following error message:
ERROR: mdopen: couldn't open thisisalongname_withsuffix: no such ...

When the file no longer exists but psql still thinks that the table
exists no DROP/CREATE/... are possible, requiring manual intervention.

This behaviour does not occur with postgresql-server-6.5.1-2.

Unfortunately, my time to chase bugs like this is severely limited,
and as it happened to occur on one of the main production systems we
quickly downgraded to 6.5.1 and solved the problem that way.

Thank you very much for your time.

I do not read the bugs mailing list, please send any relevent replies
via personal mail.

Yours,
Joachim Breuer
ICONSULT Tandogan Egerer GbR

Browse pgsql-bugs by date

  From Date Subject
Next Message Joseph Shraibman 1999-11-17 22:32:09 jdbc does not work on with blackdown jdk1.2-prev2
Previous Message Denis Faivre 1999-11-17 07:25:52 Mistake in PostgreSQL Tutorial ?