Re: pg_restore out of memory - Mailing list pgsql-general

From Tom Lane
Subject Re: pg_restore out of memory
Date
Msg-id 22509.1181942472@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_restore out of memory  (Francisco Reyes <lists@stringsutils.com>)
List pgsql-general
Francisco Reyes <lists@stringsutils.com> writes:
> Tom Lane writes:
>> Well, that's the last few lines of what I wanted, but not the part that
>> was interesting :-(.  Please show all the lines that are like the "n
>> total in m blocks" format.  Or at least look for the one(s) that contain
>> large numbers...

> Since you know best what you are looking for I just put the log for you at
> http://public.natserv.net/postgresql-2007-06-15.log

The only important space consumption seems to be here:
PortalHeapMemory: 335682660 total in 13 blocks; 68880 free (52 chunks); 335613780 used

So it's not a deferred-trigger problem (trigger events would be in their
own context).  Also, the fact that it's trying to allocate exactly 128MB
lets out a lot of possibilities --- that has to be a single huge
request, not just the end result of a boatload of little ones.  So it
probably isn't a memory leak per se.

One time that we've seen something like this before is when someone
had a COPY datafile that had had its newlines munged, such that COPY
thought it was all one long line and tried to read it all in at once.
What's the history of your datafile --- has it maybe gotten passed
through a Windows newline conversion?

            regards, tom lane

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: allocate chunk of sequence
Next
From: John DeSoi
Date:
Subject: Re: Dynamically generating DDL for postgresql object