"invalid memory alloc request size <n>" in deferred trigger causes transaction to fail, but the backend keeps running

From: Frank van Vugt <ftm(dot)van(dot)vugt(at)foxi(dot)nl>
To: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: "invalid memory alloc request size <n>" in deferred trigger causes transaction to fail, but the backend keeps running
Date: 2004-12-02 13:08:01
Message-ID: 200412021408.01287.ftm.van.vugt@foxi.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

L.S.

Situation:

- PostgreSQL v8.0.0beta5 running on x86 hardware

- a database schema that uses before/after/deferred triggers to do additional
processing on stuff like orders and invoices based on the order- and
invoice--lines; the deferred triggers are basically of the format 'update
order set ..... from (select aggregates from order_line where order_id = ...)
where id = ...' and use an updated_on field to make sure they do the
necessary work only once

The program causing the problem is a conversion tool that fills a database
thus firing the various triggers. This process is fairly lengthy (couple of
hours) and this morning I noticed that the conversion tool bailed out due to
a failed transaction commit, the log mentions:

PL/pgSQL function "tr_purchaseorder_def" line 42 at SQL statement
ERROR: invalid memory alloc request size 3248857576

The statement on line 42 is the earlier mentioned update statement.

Obviously, since the backend keeps running, it won't be easy to get my hands
on the backtrace from when this error occurs and I'm wondering about the best
way to proceed in order to produce some helpfull input to the developers.

In order to find out whether this was some hardware glitch, I immediately
restarted the process and just now it ended with exactly the same error on
exactly the same spot.

Any hints on how to dig deeper ?

--
Best,

Frank.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2004-12-02 14:15:38 Re: oid2name core dump
Previous Message Mehul Doshi-A20614 2004-12-02 08:44:40 Re: Installation fails for postgresql-8.0.0-beta4 on Windo