Re: "invalid memory alloc request size " in deferred trigger causes transaction to fail, but the backend keeps running - Mailing list pgsql-bugs

From Frank van Vugt
Subject Re: "invalid memory alloc request size " in deferred trigger causes transaction to fail, but the backend keeps running
Date
Msg-id 200412061338.50155.ftm.van.vugt@foxi.nl
Whole thread Raw
In response to Re: "invalid memory alloc request size " in deferred trigger causes transaction to fail, but the backend keeps running  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: "invalid memory alloc request size " in deferred trigger causes transaction to fail, but the backend keeps running
List pgsql-bugs
Hi Tom,

> Because the trigger function is plpgsql, this could happen only the
> first time the trigger is fired in a particular session (unless you are
> using EXECUTE to invoke the update command?).  If the problem is related
> to the planner constant-folding environment, then the first-time-only
> limitation would help make it hard to reproduce.

It looks like your suspicion was right.... I've isolated one particulare case,
simply run the script attached. If you remove the comment before the extra
call of spawn_pol() at the bottom of the script, the error is avoided.

Hopefully, solving this will also solve the other cases of mem-alloc error
I've been seeing ;) I'm not using spawn_pol/sol() during the earlier
mentioned conversion, but my hope is that the error generated during
conversion will turn out to be related and caused by the constant-folding of
some other function. But I'll know soon enough if it isn't ;)

Looking forward to your assesment.




--
Best,




Frank.

pgsql-bugs by date:

Previous
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1339: enable to init database cluster
Next
From: "PostgreSQL Bugs List"
Date:
Subject: BUG #1340: problem when showing resulted in the screen