Re: Tuplestore should remember the memory context it's created in

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tuplestore should remember the memory context it's created in
Date: 2009-12-22 15:01:44
Message-ID: 8566.1261494104@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Greg Stark <gsstark(at)mit(dot)edu> writes:
> On Tue, Dec 22, 2009 at 11:45 AM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> AFAICS it is always a bug to be in a different memory context
>> in tuplestore_put* than in tuplestore_begin_heap(), so it would be more
>> robust to not put the burden on the callers.

> I thought there were comments specifically explaining why it was done
> that way but I don't recall what they said.

I think it was just a performance optimization. It's probably not
measurable though; even in the in-memory case there's at least a palloc
inside the put() function, no?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2009-12-22 15:32:42 Re: alpha3 release schedule?
Previous Message Tom Lane 2009-12-22 14:55:17 Re: Table size does not include toast size