Re out of memory error with large insert

From: "Sriram Dandapani" <sdandapani(at)counterpane(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Re out of memory error with large insert
Date: 2006-03-22 00:16:29
Message-ID: 6992E470F12A444BB787B5C937B9D4DF03C48C0C@ca-mail1.cis.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

-----Original Message-----
From: Sriram Dandapani
Sent: Tuesday, March 21, 2006 4:01 PM
To: 'Tom Lane'
Subject: RE: [ADMIN] out of memory error with large insert

Upon monitoring with top, the insert statement process keeps eating up
memory until there is nothing left on the linux box

Why doesn't Postgres use swap in this situation

Can we control this behavior thru postgresconf.sql

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Tuesday, March 21, 2006 2:38 PM
To: Sriram Dandapani
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] out of memory error with large insert

"Sriram Dandapani" <sdandapani(at)counterpane(dot)com> writes:
> On a large transaction involving an insert of 8 million rows, after a
> while Postgres complains of an out of memory error.

If there are foreign-key checks involved, try dropping those constraints
and re-creating them afterwards. Probably faster than retail checks
anyway ...

regards, tom lane

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sriram Dandapani 2006-03-22 01:03:54 Re: out of memory error with large insert
Previous Message Tom Lane 2006-03-21 22:38:27 Re: out of memory error with large insert