| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Memory contexts reset for trigger invocations |
| Date: | 2019-02-05 14:25:28 |
| Message-ID: | 18721.1549376728@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Andres Freund <andres(at)anarazel(dot)de> writes:
> Wouldn't it be better to reset an appropriate context after each
> invocation? Yes, that'd require some care to manage the lifetime of
> tuples returned by triggers, but that seems OK?
I'm not sure that we can change much here without effectively breaking
the trigger-function API. I doubt that there's enough win to be had
to justify forcing external PLs etc to change.
Having said that, I recall that that API was kind of a pain in the
rear when I was redoing plpgsql's handling of composite variables
last year. Don't recall details right now (ENOCAFFEINE). Maybe
a wholesale rethink would be justified? But I'm not excited about
just twiddling things at the margin.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2019-02-05 14:55:27 | Re: Memory contexts reset for trigger invocations |
| Previous Message | Nikolay Shaplov | 2019-02-05 13:26:17 | Re: Ltree syntax improvement |