Re: out of memory error on a delete command

From: Kris Jurka <books(at)ejurka(dot)com>
To: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
Cc: Postgres JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: out of memory error on a delete command
Date: 2005-07-12 19:53:10
Message-ID: Pine.BSO.4.56.0507121447080.8434@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Tue, 12 Jul 2005, Csaba Nagy wrote:

> I wonder what could cause such an exception (see below). I was executing
> a "DELETE FROM table_name" command on a table with a lot of records (~
> 80 million). Now after the fact I realize I should have tried it in psql
> too to see if it fails there too, but I truncated the tables in the
> meantime via "TRUNCATE". The only reason I tried to do it via delete is
> to see how many rows were deleted, but it looks like a bad idea...
>
> org.postgresql.util.PSQLException: ERROR: out of memory

This is a backend error message so the fact that you issued the command
using JDBC is not relevent and it would have failed from psql as well.
My immediate suspicion was the deferred trigger queue being unable to hold
an event for each row deleted, but any ON DELETE triggers should have
prevented TRUNCATE from running. In any case something on the backend
side is probably using up some memory for each row being deleted.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-07-13 06:20:11 Re: patch to fix jdk 2 compile errors and v2 compatability
Previous Message Dave Cramer 2005-07-12 19:43:09 Re: out of memory error on a delete command