Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1 PostgreSQL getBytes may exceed RAM

v1.0
closed-fixed
nobody
3
2008-02-01
2007-07-11
Mike
No

The PostgreSQLStorageResource.openInput uses the ResultSet.getBytes which returns the file stored in the database as a byte array. This byte array may exceed the computer's RAM. Instead of getBytes, a stream reader should be used from the ResultSet class.

Discussion

  • Mike
    Mike
    2007-07-11

    • priority: 5 --> 3
     
  • Martin Piecyk
    Martin Piecyk
    2008-02-01

    Logged In: YES
    user_id=1750530
    Originator: NO

    Currently, the byte array's data is stored even after the data is read. I improved PostgreSQLStorageResource so it does not store the data after the data is read.

    Because StorageResource.writeDataInput() does not use streaming right now, implementing streaming for only the PostgreSQLStorageResource would not offer any advantages. Later, though, streaming should be implemented for StorageResource.writeDataInput() and all of the storage resources.

     
  • Martin Piecyk
    Martin Piecyk
    2008-02-01

    • status: open --> closed-fixed