Skip site navigation (1) Skip section navigation (2)

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:18
Message-ID: 20091229174118.7AC5F753FB7@cvs.postgresql.org (view raw or flat)
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_3_STABLE

Modified Files:
--------------
    pgsql/contrib/tablefunc:
        tablefunc.c (r1.51.2.1 -> r1.51.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/tablefunc/tablefunc.c?r1=1.51.2.1&r2=1.51.2.2)
    pgsql/contrib/xml2:
        xpath.c (r1.16.2.1 -> r1.16.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/xml2/xpath.c?r1=1.16.2.1&r2=1.16.2.2)
    pgsql/src/backend/commands:
        prepare.c (r1.80.2.1 -> r1.80.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/prepare.c?r1=1.80.2.1&r2=1.80.2.2)
    pgsql/src/backend/executor:
        execQual.c (r1.226.2.1 -> r1.226.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execQual.c?r1=1.226.2.1&r2=1.226.2.2)
        tstoreReceiver.c (r1.19.2.1 -> r1.19.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/tstoreReceiver.c?r1=1.19.2.1&r2=1.19.2.2)
    pgsql/src/backend/utils/mmgr:
        portalmem.c (r1.106.2.1 -> r1.106.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mmgr/portalmem.c?r1=1.106.2.1&r2=1.106.2.2)
    pgsql/src/backend/utils/sort:
        tuplestore.c (r1.36 -> r1.36.2.1)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/sort/tuplestore.c?r1=1.36&r2=1.36.2.1)
    pgsql/src/pl/plperl:
        plperl.c (r1.136.2.5 -> r1.136.2.6)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plperl/plperl.c?r1=1.136.2.5&r2=1.136.2.6)
    pgsql/src/pl/plpgsql/src:
        pl_exec.c (r1.202.2.5 -> r1.202.2.6)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_exec.c?r1=1.202.2.5&r2=1.202.2.6)
        plpgsql.h (r1.95.2.1 -> r1.95.2.2)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/plpgsql.h?r1=1.95.2.1&r2=1.95.2.2)

pgsql-committers by date

Next:From: Heikki LinnakangasDate: 2009-12-29 17:41:26
Subject: pgsql: Previous fix for temporary file management broke returning a set
Previous:From: Heikki LinnakangasDate: 2009-12-29 17:41:09
Subject: pgsql: Previous fix for temporary file management broke returning a set

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group