Re: OutOfMemory when inserting stream of unknown length

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: "Mikko T(dot)" <mtiihone(at)cc(dot)hut(dot)fi>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: OutOfMemory when inserting stream of unknown length
Date: 2004-08-20 09:46:25
Message-ID: 4125C871.1070608@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Mikko T. wrote:

> But now the current implementation forces the user of the
> setBinaryStream to buffer all bytes to memory just to know how many
> bytes the stream will actually hold. And after that it can already call
> setBytes thus making the whole setBinaryStream useless when the stream
> length is not known beforehand.

Not true -- consider the case where you know the length but the data is
held out of heap (for example, a large NIO buffer or a file on disk).

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2004-08-20 09:59:11 Re: OutOfMemory when inserting stream of unknown length
Previous Message Mikko T. 2004-08-20 09:23:18 Re: OutOfMemory when inserting stream of unknown length