Re: BUG #4004: out of memory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Manos Tsagias" <tsagias(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4004: out of memory
Date: 2008-03-01 18:19:38
Message-ID: 29799.1204395578@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Manos Tsagias" <tsagias(at)gmail(dot)com> writes:
> I used COPY to import a 2GB CSV file into a table. After almost 2 hours I
> got:
> ERROR: out of memory

Looks like you're running out of memory for pending AFTER trigger
events. What triggers or foreign keys have you got on that table?

The usual recommendation for bulk loading into a table with a foreign
key is to drop the FK constraint, bulk load, re-create the FK
constraint. This will be significantly faster than allowing the FK
to be checked incrementally. Yeah, it'd be nice if that were
automated for you ...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Manos Tsagias 2008-03-01 18:22:41 Re: BUG #4004: out of memory
Previous Message Michael Meskes 2008-03-01 13:25:20 Re: ecpg problem