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

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

Heikki Linnakangas wrote:
> 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?

No, I did not see that, but I see it now. I haven't committed anything
yet. I will research that and get it right.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-02-08 16:52:52 Re: [pgsql-patches] Phantom Command IDs, updated patch
Previous Message Marc Munro 2007-02-08 16:47:42 Reducing likelihood of deadlocks (was referential Integrity and SHARE locks)

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-02-08 16:52:52 Re: [pgsql-patches] Phantom Command IDs, updated patch
Previous Message Heikki Linnakangas 2007-02-08 16:38:34 Re: [pgsql-patches] Phantom Command IDs, updated patch