Re: inserting huge file into bytea cause out of memory

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: inserting huge file into bytea cause out of memory
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17BF47B3@ntex2010a.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: inserting huge file into bytea cause out of memory  (liuyuanyuan <liuyuanyuan@highgo.com.cn>)
Ответы Re: inserting huge file into bytea cause out of memory
Список pgsql-general
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

В списке pgsql-general по дате отправления: