From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Tuplestore should remember the memory context it's created in |
Date: | 2009-12-23 09:24:39 |
Message-ID: | 4B31E1D7.2020408@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> writes:
>> But we don't use tuplesort to return tuples from functions, so it's not
>> broken in a user-visible way. Unless you can think of another scenario
>> like that.
>
> (1) create a cursor whose plan involves a sort that will spill to disk
> (2) enter subtransaction
> (3) fetch from cursor (causing the sort to actually happen)
> (4) leave subtransaction
> (5) fetch some more from cursor
>
> Too busy to develop a test case right now, but ISTM it ought to fail.
That was exactly the case that we originally fixed, that caused this
PL/pgSQL issue. It works because cursors run within the portal
ResourceOwner.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2009-12-23 10:50:13 | Re: Backup history file should be replicated in Streaming Replication? |
Previous Message | Tom Lane | 2009-12-23 03:54:35 | Re: creating index names automatically? |