Re: "ERROR: out of memory" during pg_restore - Mailing list pgsql-general

From Tom Lane
Subject Re: "ERROR: out of memory" during pg_restore
Date
Msg-id 10772.1146011986@sss.pgh.pa.us
Whole thread Raw
In response to "ERROR: out of memory" during pg_restore  (Wayne Conrad <wconrad@yagni.com>)
Responses Re: "ERROR: out of memory" during pg_restore
List pgsql-general
Wayne Conrad <wconrad@yagni.com> writes:
> I've got a 7.4 database that gives postgres an "out of memory" error
> when restoring into a 32-bit build 8.1, yet restores into a 64-bit
> build of 8.1.

> Filesystem: -1367351296 total in 361 blocks; 34704 free (305 chunks); -1367386000 used

Now that I look at it, it's pretty obvious that the backend's
large-object functions all risk leaking memory that won't be recovered
till end of transaction.  I'm not sure why this wasn't noticed before
... maybe the potential leaks were only potential, or something else
changed about the usage pattern.  Anyway, it clearly needs to be fixed
to avoid problems when a single transaction executes a whole lot of
large-object operations.  I've applied the attached patch to 8.1.*,
but it could use more testing --- do you want to patch locally and
confirm it's OK for you?

            regards, tom lane


Attachment

pgsql-general by date:

Previous
From: Chris Browne
Date:
Subject: Re: Database Selection
Next
From: John DeSoi
Date:
Subject: Re: Please comment on the following OpenFTS/tsearch2 issues!