Re: Detection of nested function calls

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: Hugo Mercier <hugo(dot)mercier(at)oslandia(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Detection of nested function calls
Date: 2013-10-25 15:01:28
Message-ID: 3500.1382713288@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> On 2013-10-25 10:18:27 -0400, Tom Lane wrote:
>> I think the right way to attack it is to create some way for a Datum
>> value to indicate, at runtime, whether it's a flat value or an in-memory
>> representation.

> That sounds reasonable, and we have most of the infrastructure for it
> since the "indirect toast" thing got in.

Oh really? I hadn't been paying much attention to that, but obviously
I better go back and study it.

> I've thought about refcounting Datums several times, but I always got
> stuck when thinking about how to deal memory context resets and errors.
> Any ideas about that?

Not yet. But it makes no sense to claim that a Datum could have a
reference that's longer-lived than the memory context it's in, so
I'm not sure the context reset case is really a problem.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hugo Mercier 2013-10-25 15:07:49 Re: Detection of nested function calls
Previous Message Andres Freund 2013-10-25 14:58:15 Re: logical changeset generation v6.4