Port Bug Report: calling notify in pl/pgsql proc causes core dump

Поиск
Список
Период
Сортировка
Искать

Port Bug Report: calling notify in pl/pgsql proc causes core dump

От:
Unprivileged user <nobody>
Дата:

============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : David Mansfield
Your email address      : david@cobite.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:
---------


--------------------------------------------------------------------------

Port Bug Report: pg_dump does incorrect save of permissions in 6.4

От:
"Henry B. Hotz" <hotz@jpl.nasa.gov>
Дата:
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : Henry B. Hotz
Your email address      : hotz@jpl.nasa.gov

Category                : runtime: back-end
Severity                : serious

Summary: calling notify in pl/pgsql proc causes core dump

System Configuration
--------------------
  Operating System   : Solaris 2.5

  PostgreSQL version : 6.4

  Compiler used      : gcc 2.7.2.2

Hardware:
---------
SPARCstation 5

Versions of other tools:
------------------------
N/A

--------------------------------------------------------------------------

Problem Description:
--------------------
pg_dump -z creates grant commands of the form
grant "all" on "hotz" to "hotz";
instead of
grant "all" on "table" to "hotz";

Don't know if this is fixed in newer dot revisions or 6.5.

--------------------------------------------------------------------------

Test Case:
----------
pg_dump -z  >db.backup

--------------------------------------------------------------------------

Solution:
---------


--------------------------------------------------------------------------

Signature failed Preliminary Design Review.
Feasibility of a new signature is currently being evaluated.
h.b.hotz@jpl.nasa.gov, or hbhotz@oxy.edu

Re: [PORTS] Port Bug Report: pg_dump does incorrect save of permissions in 6.4

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
> Problem Description:
> --------------------
> pg_dump -z creates grant commands of the form
> grant "all" on "hotz" to "hotz";
> instead of
> grant "all" on "table" to "hotz";
> 
> Don't know if this is fixed in newer dot revisions or 6.5.
> 
> --------------------------------------------------------------------------
> 
> Test Case:
> ----------
> pg_dump -z  >db.backup

I just did this:

	test=> create table test (x int);
	CREATE
	test=> grant all on test to postgres;
	CHANGE
	test=> \q
	#$ pg_dump -z -d test >/bjm/l
	pg_dump: The -z option(dump ACLs) is now the default, continuing.
	#$ less /bjm/l 
	\connect - postgres
	CREATE TABLE "test" (
	        "x" int4);
	REVOKE ALL on "test" from PUBLIC;
	GRANT ALL on "test" to "postgres";
	#$

Looks OK to me.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Re: [PORTS] Port Bug Report: pg_dump does incorrect save of permissions in 6.4

От:
Herouth Maoz <herouth@oumail.openu.ac.il>
Дата:
At 01:21 +0300 on 25/06/1999, Henry B. Hotz wrote:


> pg_dump -z creates grant commands of the form
> grant "all" on "hotz" to "hotz";
> instead of
> grant "all" on "table" to "hotz";
>
> Don't know if this is fixed in newer dot revisions or 6.5.

It was fixed in 6.4.2, and I would guess 6.5 too.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma


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

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:

Jan, this is yours.


> 
> ============================================================================
>                         POSTGRESQL BUG REPORT TEMPLATE
> ============================================================================
> 
> 
> Your name               : David Mansfield
> Your email address      : david@cobite.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:
> ---------
> 
> 
> --------------------------------------------------------------------------
> 
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

От:
David Mansfield <david@cobite.com>
Дата:

> 
> 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@cobite.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@cobite.com             |
\==============================/

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

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
Can someone comment on this?


> 
> > 
> > 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@cobite.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@cobite.com             |
> \==============================/
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

От:
Bruce Momjian <maillist@candle.pha.pa.us>
Дата:
Is this fixed?


> 
> > 
> > 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@cobite.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@cobite.com             |
> \==============================/
> 
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

От:
David Mansfield <david@cobite.com>
Дата:

> 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@cobite.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@cobite.com             |
> > \==============================/
> > 
> > 
> 
> 
> 

-- 
/==============================\
| David Mansfield              |
| david@cobite.com             |
\==============================/

FAQ