Re: Invalid memory alloc request - Mailing list pgsql-general

From Guy Helmer
Subject Re: Invalid memory alloc request
Date
Msg-id 4A9416B5.8080603@palisadesys.com
Whole thread Raw
In response to Re: Invalid memory alloc request  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Invalid memory alloc request
List pgsql-general
Tom Lane wrote:
Guy Helmer <ghelmer@palisadesys.com> writes: 
Tom Lane wrote:   
Normally I'd say "data corruption", but it is odd if you got the
identical message from two different machines.  Can you reproduce
it with a debugger attached?  If so, a backtrace from the call of
errfinish might be useful.     
 
Yes, here is the backtrace.   
Well, that looks just about like you'd expect for a bytea column.

Hmm ... you mentioned 500MB total in the textdata column.  Is it
possible that that's nearly all in one entry?  It's conceivable
that the text representation of the entry is simply too large.
(The next question of course would be how you got the entry in there,
but maybe it was submitted in binary protocol, or built by
concatenation.)
		regards, tom lane 
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().

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

Thanks,
Guy

--

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: R: Field's position in Table
Next
From: Tom Lane
Date:
Subject: Re: somewhat slow query with subselect