Re: Invalid memory alloc request

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Invalid memory alloc request
Дата
Msg-id 23213.1251219906@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Invalid memory alloc request  (Guy Helmer <ghelmer@palisadesys.com>)
Список pgsql-general
Guy Helmer <ghelmer@palisadesys.com> writes:
> On the system where I captured the backtrace, there are several
> 400MB-long entries in the textdata column.  I inserted these entries by
> doing an "INSERT (..., textdata) VALUES (..., $1)", mmap'ed the data
> from a file into memory, and executed the command using PQexecParams().

OK, then it's just that the values are too long to print :-(

> Is there a quantifiable limit to the size of values I insert into a
> bytea column?  I haven't found a limit documented anywhere...

The hard limit is that the text representation has to fit into 1GB.
The text form can range from 1 to 5 characters per byte, so the worst
case would be that you hit this at about 200MB.

FWIW, there is already code in place for 8.5 that establishes a
hex-based representation with a 2:1 multiplier, so that you could expect
to go up to 500MB with future releases.  On the whole, though, you might
want to think about storing these values as large objects or external
files.

            regards, tom lane

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

Предыдущее
От: james bardin
Дата:
Сообщение: Re: warm standby and reciprocating failover
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: How to simulate crashes of PostgreSQL?