Re: Memory error - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Memory error
Date
Msg-id 25553.1251404553@sss.pgh.pa.us
Whole thread Raw
In response to Memory error  (Daniel Weinberger <daniel.weinberger@gmail.com>)
List pgsql-bugs
Daniel Weinberger <daniel.weinberger@gmail.com> writes:
> Yesterday I ran an SQL import.  It failed after 3.33 hours with following
> message:
> ERROR:  out of memory

Looks like the memory consumption is here:

>     AfterTriggerEvents: 317710336 total in 49 blocks; 1312 free (42 chunks);
> 317709024 used

Perhaps you should look into the memory limits on your postmaster, as
falling over after 300MB doesn't seem very sane for any reasonably
modern machine.  However, the real answer is probably to drop whatever
after-row triggers you've got on the target table (perhaps FOREIGN KEY
constraints?) and re-establish the constraints after doing the import.

There's been some speculation about better ways to manage mass updates
of foreign key constraints, but nobody's done anything about it yet...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Devrim GÜNDÜZ
Date:
Subject: Re: BUG #5017: unsigned packages in RHEL4 8.3 packages
Next
From: Robert Haas
Date:
Subject: Re: BUG #5019: Nao funciona