Adding field in Servoy locks up PostgreSQL table?

[update] See post below, table not damaged, just locked. No need to drop table, just restart database server.

Hi all,

I have just managed to ‘corrupt’ a PostgreSQL table by adding an integer field from Servoy. I’m calling it ‘corrupt’, since I’m no longer able to access the table. This is not the first time adding fields from Servoy has damaged tables. All other tables in the database remain OK, Servoy server continues to run, but if you try accessing the damaged table, you freeze. You can repair by dropping the damaged table and restoring the table from a backup.

I’m on Servoy Developer 3.1.3, Mac OS X 10.4.9, PostgreSQL drivers that came with Servoy. PostgreSQL database server 8.1.4 on both Mac OS X and Windows.

My suspicion is that this is a problem with the driver rather than Servoy itself.

There does not seem to be any problem adding fields from pgAdminIII or ActiveRecord (Ruby drivers).

Have anyone else using PostgreSQL come across this problem?

What JDBC driver version do you use?
And is it only Servoy that hangs when you access that altered table or do tools like psql and pgAdmin3 also hang ?

Servoy,pgAdmin3 and pg_dump/pg_restore hang. Haven’t tried psql.

How do I find the version of the driver?

Mine is Modified/Created 14.15 8 June 2006, 402,906 bytes.

I guess you can only read out the version with a java call.
Anyway, why don’t you download the latest matching driver at http://jdbc.postgresql.org/download.html and see if you can still produce the problem.

I think it is a 8.1 driver of some kind.

Have downloaded 8.2.

Don’t particularly want to reproduce this problem!

UPDATE: The problem seems to be caused by Servoy getting an exclusive lock on the table I’m adding fields to. Servoy fails to add the fields, and the lock is never released, causing the symtoms above.

After restarting the PostgreSQL server, the lock is gone and everything is back to normal.

Your first post was about Servoy 3.1.3.
Does/did it still happen with Servoy 3.1.6 ?

Glad you found the real cause.