Re: Memory error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Daniel Weinberger <daniel(dot)weinberger(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Memory error
Date: 2009-08-27 20:22:33
Message-ID: 25553.1251404553@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Daniel Weinberger <daniel(dot)weinberger(at)gmail(dot)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

In response to

  • Memory error at 2009-08-27 18:40:31 from Daniel Weinberger

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2009-08-27 21:13:05 Re: BUG #5019: Nao funciona
Previous Message Devrim GÜNDÜZ 2009-08-27 18:52:29 Re: BUG #5017: unsigned packages in RHEL4 8.3 packages