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

pgsql: Repair oversights in the mechanism used to store compiled plpgsql

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Repair oversights in the mechanism used to store compiled plpgsql
Date: 2007-01-30 22:05:25
Message-ID: 20070130220525.C0ABC9FB423@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Repair oversights in the mechanism used to store compiled plpgsql functions.
The original coding failed (tried to access deallocated memory) if there were
two active call sites (fn_extra pointers) for the same function and the
function definition was updated.  Also, if an update of a recursive function
was detected upon nested entry to the function, the existing compiled version
was summarily deallocated, resulting in crash upon return to the outer
instance.  Problem observed while studying a bug report from Sergiy
Vyshnevetskiy.

Bug does not exist before 8.1 since older versions just leaked the memory of
obsoleted compiled functions, rather than trying to reclaim it.

Tags:
----
REL8_1_STABLE

Modified Files:
--------------
    pgsql/src/pl/plpgsql/src:
        pl_comp.c (r1.94.2.2 -> r1.94.2.3)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_comp.c.diff?r1=1.94.2.2&r2=1.94.2.3)
        pl_handler.c (r1.26 -> r1.26.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_handler.c.diff?r1=1.26&r2=1.26.2.1)
        plpgsql.h (r1.65.2.2 -> r1.65.2.3)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/plpgsql.h.diff?r1=1.65.2.2&r2=1.65.2.3)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2007-01-30 22:29:23
Subject: pgsql: Update documentation for backslashes to mention escape string
Previous:From: Tom LaneDate: 2007-01-30 22:05:20
Subject: pgsql: Repair oversights in the mechanism used to store compiled plpgsql

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