From: | jonathan(dot)lister(at)vaisala(dot)com |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Cc: | oliver(at)opencloud(dot)com |
Subject: | Re: Is there a size limit on setBinaryStream? |
Date: | 2004-11-28 17:00:23 |
Message-ID: | 0077BA604D38D311918B00508B44425802AAEA39@birsrv01.vaisala.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
oops, I meant *setBinaryStream()* of course!
-----Original Message-----
From: Lister Jonathan PJL
Sent: 28 November 2004 16:55
To: pgsql-jdbc(at)postgresql(dot)org
Cc: 'Oliver Jowett'
Subject: RE: [JDBC] Is there a size limit on setBinaryStream?
Excellent diagnostics Oliver - I downloaded pg80b1.308.jdbc.jar and the
calls to setBytes() started to work with files in the 4 - 7 Gig range
without any other changes to my code.
Many thanks!
-----Original Message-----
From: Oliver Jowett [mailto:oliver(at)opencloud(dot)com]
Sent: 28 November 2004 12:40
To: jonathan(dot)lister(at)vaisala(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] Is there a size limit on setBinaryStream?
jonathan(dot)lister(at)vaisala(dot)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
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-11-28 22:23:04 | Re: [JDBC] Strange server error with current 8.0beta driver |
Previous Message | jonathan.lister | 2004-11-28 16:54:31 | Re: Is there a size limit on setBinaryStream? |