error in pgsqldumb class to restore large object
error in pgsqldumb class to restore large object
hi,
i am using pgsqldump class to backup and restore my postgre database
using method backup and restore but when i restore large object (some what 46MB in size) i got the exception
"Exception of type 'System.OutOfMemoryException' was thrown."
while creting backup file i had made IncludeBlob = true
for backup i had write this code
Dim pgdumb As New PgSqlDump
pgdumb.Connection = Connection
pgdumb.Mode = Devart.Data.PostgreSql.DumpMode.Data
pgdumb.IncludeBlob = True
pgdumb.Backup("D:\testbackup.backup")
Connection.Close()
for restore
Dim pgDump As PgSqlDump = New PgSqlDump
pgDump.Connection = conn
pgDump.Restore("D:\testbackup.backup")
conn.close
ANY SuGESSTION PLZ HELP [/code]
i am using pgsqldump class to backup and restore my postgre database
using method backup and restore but when i restore large object (some what 46MB in size) i got the exception
"Exception of type 'System.OutOfMemoryException' was thrown."
while creting backup file i had made IncludeBlob = true
for backup i had write this code
Dim pgdumb As New PgSqlDump
pgdumb.Connection = Connection
pgdumb.Mode = Devart.Data.PostgreSql.DumpMode.Data
pgdumb.IncludeBlob = True
pgdumb.Backup("D:\testbackup.backup")
Connection.Close()
for restore
Dim pgDump As PgSqlDump = New PgSqlDump
pgDump.Connection = conn
pgDump.Restore("D:\testbackup.backup")
conn.close
ANY SuGESSTION PLZ HELP [/code]
hello shalex,
i had check this backup and restore method on two different pc (with file of size 300 mb in my database ) of same configuration (2 GB RAM,250 GB Hard Drive,os windows 7 ) ,
error remains same (out of memory) but two different size backup file created ,
on one pc error appears after 460mb backup file created and in another it appear after 14 mb backup file created , and this time error appears on backup method of pgsqldump class.
Any update from ur side on this issue
i had check this backup and restore method on two different pc (with file of size 300 mb in my database ) of same configuration (2 GB RAM,250 GB Hard Drive,os windows 7 ) ,
error remains same (out of memory) but two different size backup file created ,
on one pc error appears after 460mb backup file created and in another it appear after 14 mb backup file created , and this time error appears on backup method of pgsqldump class.
Any update from ur side on this issue
We have implemented the PgSqlDump.BlockSize property to control the size of data block when making dump of a large object. This allows to avoid System.OutOfMemoryException because a particular "SELECT lowrite(...)" for a big "large object" will be divided into several "SELECT lowrite(...)" commands depending on the value of PgSqlDump.BlockSize. The feature will be included in the next public build of dotConnect for Postgresql (in 2-3 weeks). Is this timeframe suitable for you?
New build of dotConnect for PostgreSQL 5.30.202 is available for download!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ . For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=21729 .
This build includes the PgSqlDump.BlockSize property. We recommend you to dump data directly to the file PgSqlDump.Backup(string fileName) (not to PgSqlDump.DumpText) because this can be the reason of System.OutOfMemoryException. Also set the "Default Command Timeout=0;" connection string parameter - lo_unlink can take a lot of time.
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ . For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=21729 .
This build includes the PgSqlDump.BlockSize property. We recommend you to dump data directly to the file PgSqlDump.Backup(string fileName) (not to PgSqlDump.DumpText) because this can be the reason of System.OutOfMemoryException. Also set the "Default Command Timeout=0;" connection string parameter - lo_unlink can take a lot of time.