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

Re: [PORTS] Port Bug Report: calling notify in pl/pgsql proc causes core dump

From: David Mansfield <david(at)cobite(dot)com>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-ports(at)postgreSQL(dot)org
Subject: Re: [PORTS] Port Bug Report: calling notify in pl/pgsql proc causes core dump
Date: 1999-09-23 20:56:46
Message-ID: Pine.LNX.4.04.9909231656100.21052-100000@spike.cobite.com (view raw or flat)
Thread:
Lists: pgsql-ports
> Is this fixed?

Yes.  This patch (with a different comment) was applied to one of the
recent versions.  Call it closed!

David


> > 
> > > 
> > > Jan, this is yours.
> > > 
> > 
> > Actually, I made a 'workaround' fix to this problem (after posting this
> > bug report). I'll append the patch.  I don't pretend to understand the
> > internals of this system, but my guess is that a simple statement like
> > 'notify xyz' went through the planner, got an spi_plan, but the 'plan
> > list' was empty.  So here's my patch, which may be fixing a symptom, not
> > the cause, YMMV:
> > 
> > --- pl_exec.c~  Wed May 26 03:07:39 1999
> > +++ pl_exec.c   Fri Jun 25 11:00:53 1999
> > @@ -2482,6 +2482,10 @@
> >  
> >         plan = (Plan *) lfirst(spi_plan->ptlist);
> >  
> > +       /* it would seem as though plan can be null... --DAVID */
> > +       if (plan == NULL)
> > +               return;
> > +
> >         /* ----------
> >          * 2. It must be a RESULT plan --> no scan's required
> >          * ----------
> > 
> > 
> > > 
> > > > 
> > > > ============================================================================
> > > >                         POSTGRESQL BUG REPORT TEMPLATE
> > > > ============================================================================
> > > > 
> > > > 
> > > > Your name               : David Mansfield
> > > > Your email address      : david(at)cobite(dot)com
> > > > 
> > > > Category                : runtime: back-end
> > > > Severity                : serious
> > > > 
> > > > Summary: calling notify in pl/pgsql proc causes core dump
> > > > 
> > > > System Configuration
> > > > --------------------
> > > >   Operating System   : Linux 2.2.9
> > > > 
> > > >   PostgreSQL version : 6.5
> > > > 
> > > >   Compiler used      : gcc 2.7.2.3
> > > > 
> > > > Hardware:
> > > > ---------
> > > > RedHat 5.2
> > > > 
> > > > Versions of other tools:
> > > > ------------------------
> > > > RedHat 5.2 standard
> > > > 
> > > > --------------------------------------------------------------------------
> > > > 
> > > > Problem Description:
> > > > --------------------
> > > > calling notify in pl/pgsql proc causes core dump
> > > > 
> > > > --------------------------------------------------------------------------
> > > > 
> > > > Test Case:
> > > > ----------
> > > > createdb bugs
> > > > psql bugs
> > > > \i /usr/src/postgresql-6.5/src/pl/plpgsql/src/mklang.sql
> > > > create  function a_func()
> > > >         returns 
> > > >                 char
> > > >         as 
> > > >                 'begin
> > > >                        notify my_listen;
> > > >                        return \'a\';
> > > >                  end;'
> > > >         language
> > > >                 'plpgsql'
> > > > ;
> > > > select a_func();
> > > > 
> > > > 
> > > > --------------------------------------------------------------------------
> > > > 
> > > > Solution:
> > > > ---------
> > > > 
> > > > 
> > > > --------------------------------------------------------------------------
> > > > 
> > > > 
> > > > 
> > > 
> > > 
> > > 
> > 
> > -- 
> > /==============================\
> > | David Mansfield              |
> > | david(at)cobite(dot)com             |
> > \==============================/
> > 
> > 
> 
> 
> 

-- 
/==============================\
| David Mansfield              |
| david(at)cobite(dot)com             |
\==============================/


In response to

pgsql-ports by date

Next:From: Kurt SeelDate: 1999-09-23 21:07:26
Subject: Re: FreeBSD installation
Previous:From: Ed LoehrDate: 1999-09-23 20:12:47
Subject: successful pg 6.5.2 install on RH 5.2

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