Hi!

FYI: a nasty mistake... :)

I am writing a java application, which uses postgreSQL thru JDBC2.

I have two connections to database;
a batch connection, which is initialized as
                    realConnection.setAutoCommit( false );
                    realConnection.setTransactionIsolation(
realConnection.TRANSACTION_READ_COMMITTED );

a query connection, which was initialized as
                    realConnection.setAutoCommit( false );
                    realConnection.setTransactionIsolation(
realConnection.TRANSACTION_READ_COMMITTED );
                    realConnection.setReadOnly( true );

Well everything was okay, until I started to drop tables and indexes... :(
Drop statements did hangup for forever when backend did try to take
exclusive accss lock of index or table.

I used these connections as
batch: created table&indexes. Initialized table with some data
query: make several queries
batch: cleanup and drop indexes&table

After couple of days, I did finally found the *real* reason for hangup...
The query connection is not set to be an autocommitted, however, I didn't
use any connection.commit(). The rest you can imagine... ;-)

Now everything works fine, when I put autocommit on for query connection.


Matti "a bit smarter" Lehtonen
--
Matti Lehtonen   Software designer,   Stonesoft Corp.   Networks R&D
Addr: Itï¿½lahdenkatu 22 A,   FIN-00210 Helsinki
Mobile: +358 40 750 4969   Fax: +358 9 4767 1345
E-mail: matti.lehtonen@stonesoft.com
Internet: http://www.stonesoft.com/



Sat, 22 Sep 2001 22:35:32 +0300
Matti.Lehtonen@stonesoft.com
DROP TABLE and DROP INDEX hangs up in version 7.1.3, when...