Locking

Поиск
Список
Период
Сортировка
От Sacauskis, Mike
Тема Locking
Дата
Msg-id 0F35BAEA672CA340974082D0348491E603954717@HQ-EXVS03.anteon.com
обсуждение исходный текст
Список pgsql-jdbc

I’m running into a problem where an "AccessShareLock" is not being released after a select statement unless a connection is closed.  This is leading me to  a deadlock issue with deletes. I’m using JDBC to interact with the database.   I’m using postgresQL 8.0.   I was under the impression that  resources (does this include locks) are released when the prepared statement is closed.  The code snippet looks like the following (though it does more prosessing then in this example.   Is there something that I’m missing to release the locks?

 

          String sql = "select * from testtable";

          PreparedStatement prest = con.prepareStatement(sql);         

          ResultSet rs =  prest.executeQuery();

          rs.next();

          rs.close();

          prest.close();

          con.close();

 

 

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Problem establishing connection
Следующее
От: "Jan de Visser"
Дата:
Сообщение: Re: Locking