Re: DELETE eats up all memory and crashes box

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Worky Workerson" <worky(dot)workerson(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: DELETE eats up all memory and crashes box
Date: 2006-10-06 18:35:12
Message-ID: 4305.1160159712@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Worky Workerson" <worky(dot)workerson(at)gmail(dot)com> writes:
> When I issue a fairly large DELETE query which has multiple tables
> with FOREIGN KEY .... CASCADE on them, Postgres eats up *all* the
> memory on my system and the system crashes.

Well, the memory eating is easy to explain: pending-trigger-event list.
System crash sounds like a kernel bug or misconfiguration. You might
want to make sure you have "strict" memory overcommit mode set, else the
problem might just be an inopportune choice of target by the OOM killer.

(I *think* they fixed the OOM killer to never select init, but there are
still plenty of processes you'd not like it to pick ...)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Casey Duncan 2006-10-06 18:36:51 Re: Two efficiency questions - clustering and ints
Previous Message Jeff Davis 2006-10-06 18:34:05 Re: server closed the connection unexpectedly