Search Postgresql Archives

Re: inserting huge file into bytea cause out of memory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



liuyuanyuan wrote:
> By the way, my project is about migrating Oracle data of BLOB type to
> PostgreSQL database. The out of memory  error occurred  between migrating
> Oracle BLOB to PostgreSQL bytea. Another question, if I can't migrate BLOB to bytea,
> how about oid type ?

Large Objects (I guess that's what you mean with "oid" here)
might be the better choice for you, particularly since you
have out of memory problems.

While bytea is always written in one piece, you can stream
large objects by reading and writing them in smaller chunks.
Moreober, large objects have a bigger size limit than
the 1GB of bytea.

The downside is that the API is slightly more complicated,
and you'll have to take care that the large object gets
deleted when you remove the last reference to it from your
database.

Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux