Skip site navigation (1) Skip section navigation (2)

Re: ERROR: invalid memory alloc request size

From: Johann Spies <jspies(at)sun(dot)ac(dot)za>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: ERROR: invalid memory alloc request size
Date: 2007-05-29 09:39:10
Message-ID: 20070529093910.GA24350@sun.ac.za (view raw or flat)
Thread:
Lists: pgsql-admin
On Mon, May 28, 2007 at 11:18:37AM -0400, Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Johann Spies wrote:
> >> #3  0x00000000005ff1c8 in perform_default_encoding_conversion (
> >> src=0x2b881e87f040 "\"2007-04-20\" \"18:07:06\" \"192.168.0.100\" \"73\" \"http://www.kerkbode.co.za/kerkbode/images/blank.gif\\\"\"\n\"2007-04-20\" \"18:07:06\" \"192.168.0.100\" \"69\" \"http://develop.christians.co.za/phpAdsNew/adx.js\"\n\"20"..., len=337739539, is_client_to_server=5 '\005') at mbutils.c:461
> 
> 
> > Interesting.  You are passing a single 300 MB string here, not
> > 90-something char lines.  The problem is probably in newlines.  Why are
> > they not getting used as line separators escapes me.
> 
> Stripped of gdb's own backslashing, the data seems to be 
> 
> 	...images/blank.gif\""
                           ^^

And that is where the problem is. 

> 	"2007...
> 
> which leads me to think that the dump was generated on the assumption
> that backslash is the escape character, but is being reloaded under a
> different assumption. 

Backslash is indeed used as escape character.  I see now that I should
have specified it in my copy command!

I have figured out how to do it now and successfully imported that part
of the logs into a table.

Thanks for your help.

Regards
Johann
-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch

     "Let no man despise thy youth; but be thou an example 
      of the believers, in word, in conversation, in
      charity, in spirit, in faith, in purity."      
                                       I Timothy 4:12

In response to

pgsql-admin by date

Next:From: Joshua KramerDate: 2007-05-29 13:58:16
Subject: Re: PostgreSQL Training?
Previous:From: Johann SpiesDate: 2007-05-29 06:39:57
Subject: Re: ERROR: invalid memory alloc request size

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group