Re: "ERROR: out of memory" during pg_restore

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wayne Conrad <wconrad(at)yagni(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "ERROR: out of memory" during pg_restore
Date: 2006-04-26 00:39:46
Message-ID: 10772.1146011986@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Wayne Conrad <wconrad(at)yagni(dot)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 Content-Type Size
large-object-leak.patch application/octet-stream 15.3 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2006-04-26 00:48:09 Re: Please comment on the following OpenFTS/tsearch2 issues!
Previous Message Chris Browne 2006-04-25 22:58:50 Re: Database Selection