Re: [pgsql-patches] Phantom Command IDs, updated patch

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [pgsql-patches] Phantom Command IDs, updated patch
Date: 2007-02-08 16:38:34
Message-ID: 45CB520A.3070108@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian wrote:
> Heikki, I found something odd in your patch. You had an extra
> parentheses at the end of the line in the orginal and new version of the
> patch (attached). I removed it before applying, but I just wanted to
> confirm this was OK.

Looking at the CVS history, it looks like Tom changed that piece of code
recently in this commit:

> revision 1.110
> date: 2007-01-30 22:05:12 +0000; author: tgl; state: Exp; lines: +88 -21;
> 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.

Note that the condition in the if-clause is now the other way round, and
the delete_function call is now in the else-branch. Did you get that
right in your commit?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc Munro 2007-02-08 16:47:42 Reducing likelihood of deadlocks (was referential Integrity and SHARE locks)
Previous Message Marc Munro 2007-02-08 16:34:14 Re: referential Integrity and SHARE locks

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2007-02-08 16:51:11 Re: [pgsql-patches] Phantom Command IDs, updated patch
Previous Message korryd 2007-02-08 16:30:15 Re: [pgsql-patches] Fixed shared_preload_libraries on Win32