Re: Major Memory Leak in PostgreSQL JDBC Driver

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: Major Memory Leak in PostgreSQL JDBC Driver
Дата
Msg-id 987513577.3adc42e91ec2a@webmail.retep.org.uk
обсуждение исходный текст
Ответ на Major Memory Leak in PostgreSQL JDBC Driver  ("Gerald Gutierrez" <gutz@kalador.com>)
Список pgsql-bugs
Quoting Gerald Gutierrez <gutz@kalador.com>:

>
> At least the 7.1 RC3 driver has a memory leak in that the
> .../jdbc2/PreparedStatement.java class uses Java's ThreadLocal object
> for
> "optimization" reasons. However, Sun's J2SE 1.3 leaks memory whenever
> this
> class is used. Hence, repeated use of the JDBC driver's
> PreparedStatement
> class will cause a major memory leak.

This has already been reported (and there now exists a bug registered with Sun).

As soon as I can I'm going to remove the need for ThreadLocal from the driver.

> that it doesn't have to be instantiated each time (this is the
> optimization), just instantiate the SimpleDateFormat class each time.
> We've
> noticed no performance loss and our application no longer has any
> memory
> leaks.

There was some discussion about this some time ago, and the concensus then was
to limit the number of instanciated SimpleDateFormat's to a minimum.

> Please consider fixing this problem before releasing 7.1.

It should be (assuming I get some spare time between now and then - ie why I'm
a week behind on emails).

Peter

--
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/

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

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: JDBC setObject(n,obj) throws exception when obj is null
Следующее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: What's wrong with glibc-devel-2.2