pgsql: Previous fix for temporary file management broke returning a set

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Previous fix for temporary file management broke returning a set
Date: 2009-12-29 17:41:35
Message-ID: 20091229174135.EBCCA753FB7@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Previous fix for temporary file management broke returning a set from
PL/pgSQL function within an exception handler. Make sure we use the right
resource owner when we create the tuplestore to hold returned tuples.

Simplify tuplestore API so that the caller doesn't need to be in the right
memory context when calling tuplestore_put* functions. tuplestore.c
automatically switches to the memory context used when the tuplestore was
created. Tuplesort was already modified like this earlier. This patch also
removes the now useless MemoryContextSwitch calls from callers.

Report by Aleksei on pgsql-bugs on Dec 22 2009. Backpatch to 8.1, like
the previous patch that broke this.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
pgsql/contrib/tablefunc:
tablefunc.c (r1.38.2.2 -> r1.38.2.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/tablefunc/tablefunc.c?r1=1.38.2.2&r2=1.38.2.3)
pgsql/contrib/xml2:
xpath.c (r1.8.2.1 -> r1.8.2.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/xml2/xpath.c?r1=1.8.2.1&r2=1.8.2.2)
pgsql/src/backend/executor:
execQual.c (r1.183.2.6 -> r1.183.2.7)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execQual.c?r1=1.183.2.6&r2=1.183.2.7)
tstoreReceiver.c (r1.15.2.1 -> r1.15.2.2)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/tstoreReceiver.c?r1=1.15.2.1&r2=1.15.2.2)
pgsql/src/backend/utils/sort:
tuplestore.c (r1.23.2.2 -> r1.23.2.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/sort/tuplestore.c?r1=1.23.2.2&r2=1.23.2.3)
pgsql/src/pl/plperl:
plperl.c (r1.94.2.13 -> r1.94.2.14)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plperl.c?r1=1.94.2.13&r2=1.94.2.14)
pgsql/src/pl/plpgsql/src:
pl_exec.c (r1.154.2.8 -> r1.154.2.9)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c?r1=1.154.2.8&r2=1.154.2.9)
plpgsql.h (r1.65.2.4 -> r1.65.2.5)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/plpgsql.h?r1=1.65.2.4&r2=1.65.2.5)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-12-29 20:11:45 pgsql: Add the ability to store inheritance-tree statistics in
Previous Message Heikki Linnakangas 2009-12-29 17:41:26 pgsql: Previous fix for temporary file management broke returning a set