Re: Is there a size limit on setBinaryStream?

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Is there a size limit on setBinaryStream?
Дата
Msg-id 41A9C70C.9090503@opencloud.com
обсуждение исходный текст
Ответ на Is there a size limit on setBinaryStream?  (jonathan.lister@vaisala.com)
Список pgsql-jdbc
jonathan.lister@vaisala.com wrote:
> I am using pg74.215.jdbc3.jar [...]

> My code is very similar to the example given in the documentation. It
> seems to work OK for files up to around 780k, but when I try a larger
> file (e.g. 5,498k it seems to just "hang" .. no exception, no error report).

I suspect continuous GC is the cause, especially if you're running with
a small heap. Try turning on -verbose:gc and see what you get.

You will have more success with large binary objects if you use the
development driver. The stable driver creates a lot of intermediate
representations when you use setBytes() or setBinaryStream(). This means
you need perhaps 10-20 times the stream's length in temporary heap space.

The development driver streams the data directly, and should only need a
small constant-sized intermediate buffer regardless of the stream length.

-O

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

Предыдущее
От: "Éric Paré"
Дата:
Сообщение: Re: Is there a size limit on setBinaryStream?
Следующее
От: jonathan.lister@vaisala.com
Дата:
Сообщение: Re: Is there a size limit on setBinaryStream?