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:20
Message-ID: 20070130220520.44F6C9FB410@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
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_2_STABLE

Modified Files:
--------------
pgsql/src/pl/plpgsql/src:
pl_comp.c (r1.108 -> r1.108.2.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_comp.c.diff?r1=1.108&r2=1.108.2.1)
pl_handler.c (r1.33.2.1 -> r1.33.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/pl_handler.c.diff?r1=1.33.2.1&r2=1.33.2.2)
plpgsql.h (r1.81.2.1 -> r1.81.2.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/plpgsql.h.diff?r1=1.81.2.1&r2=1.81.2.2)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2007-01-30 22:05:25 pgsql: Repair oversights in the mechanism used to store compiled plpgsql
Previous Message Tom Lane 2007-01-30 22:05:13 pgsql: Repair oversights in the mechanism used to store compiled plpgsql