Re: DELETE eats up all memory and crashes box - Mailing list pgsql-general

From Tom Lane
Subject Re: DELETE eats up all memory and crashes box
Date
Msg-id 4305.1160159712@sss.pgh.pa.us
Whole thread Raw
In response to DELETE eats up all memory and crashes box  ("Worky Workerson" <worky.workerson@gmail.com>)
Responses Re: DELETE eats up all memory and crashes box  ("Worky Workerson" <worky.workerson@gmail.com>)
List pgsql-general
"Worky Workerson" <worky.workerson@gmail.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

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: server closed the connection unexpectedly
Next
From: kaspro@web.de
Date:
Subject: Re: storing transactions