Re: Tuplestore should remember the memory context it's created in
От | Greg Stark |
---|---|
Тема | Re: Tuplestore should remember the memory context it's created in |
Дата | |
Msg-id | 407d949e0912220416q78857a17n6eb990b2f175e6c2@mail.gmail.com обсуждение исходный текст |
Ответ на | Tuplestore should remember the memory context it's created in (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>) |
Ответы |
Re: Tuplestore should remember the memory context it's created in
|
Список | pgsql-hackers |
On Tue, Dec 22, 2009 at 11:45 AM, Heikki Linnakangas <heikki.linnakangas@enterprisedb.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. > ... > Patch against CVS HEAD to do that and fix the reported bug attached. Now > that the tuplestore_put* switches to the right memory context, we could > remove that from all the callers, but this patch only does it for pl_exec.c. > > Thoughts? I thought there were comments specifically explaining why it was done that way but I don't recall what they said. Perhaps it was a performance concern since it's going to happen for every tuple put in the tuplestore and usually you'll just be in the same memory context anyways. It would certainly be a lot less confusing the way you describe though. -- greg
В списке pgsql-hackers по дате отправления: