Re: [HACKERS] SIGSEGV in sebselect. - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] SIGSEGV in sebselect.
Date
Msg-id 199802230017.TAA04942@candle.pha.pa.us
Whole thread Raw
In response to SIGSEGV in sebselect.  (Keith Parks <emkxp01@mtcc.demon.co.uk>)
List pgsql-hackers
>
> Hi All,
>
> I'm getting a SIGSEGV with the following subselect:-
>
> select * from disks where diskid in
>  ( select distinct diskid from tracks where artist = 'Led Zeppelin');
>
> The source tree is a cvsup from 22nd Feb (AM GMT)
> Platform is Linux/SPARC
>
> I'm afraid my debugging skills are limited to generating a backtrace
> so here goes....

This is a partial fix.  In make_unique(), if Query->uniqueAttr is '*',
Unique->uniqueAttr gets null.  However, with this fix, I get:

    test=> select usesysid from pg_user where usesysid in (select distinct
    usesysid from pg_user);
    ERROR:  ExecReScan: node type 24 not supported

I have not installed this patch yet until Vadim comments and perhaps has
an idea on the ExecReScan message:


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

*** ./backend/nodes/copyfuncs.c.orig    Sun Feb 22 18:58:59 1998
--- ./backend/nodes/copyfuncs.c    Sun Feb 22 19:03:37 1998
***************
*** 549,555 ****
       *    copy remainder of node
       * ----------------
       */
!     newnode->uniqueAttr = pstrdup(from->uniqueAttr);
      newnode->uniqueAttrNum = from->uniqueAttrNum;
      Node_Copy(from, newnode, uniquestate);

--- 549,558 ----
       *    copy remainder of node
       * ----------------
       */
!     if (newnode->uniqueAttr)
!         newnode->uniqueAttr = pstrdup(from->uniqueAttr);
!     else
!         newnode->uniqueAttr = NULL;
      newnode->uniqueAttrNum = from->uniqueAttrNum;
      Node_Copy(from, newnode, uniquestate);



--
Bruce Momjian
maillist@candle.pha.pa.us

pgsql-hackers by date:

Previous
From: Keith Parks
Date:
Subject: Re: [HACKERS] SIGSEGV in sebselect.
Next
From: "Vadim B. Mikheev"
Date:
Subject: Re: [HACKERS] SIGSEGV in sebselect.