Search Postgresql Archives

Re: Invalid memory alloc request

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

 



Guy Helmer <ghelmer@xxxxxxxxxxxxxxx> 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

-- 
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