Thread: ERROR: unrecognized node type in PostgresMain( )

ERROR: unrecognized node type in PostgresMain( )

From
mchron@aueb.gr
Date:
>>> Perhaps you should rebuild the backend with -g (see --enable-debug) so
>>> that gdb can actually be somewhat helpful.  It's usually a good idea to
>>> have --enable-cassert turned on when hacking C code, too. 
>>

When I rebuilded the backend with --enable-debug and --enable-cassert
the database stops and restarts, before it reaches the breakpoint at 
create_plan() in createplan.c. So I can't figure out what is happening. 
(errors came out at function Assert()) 

>>> (My bet is that control got as far as executor startup, which you
>>> already said you hadn't fixed to understand this new node type,
>>> so the error is exactly what I'd expect.) 
>>

As far as I can see, the Executor starts with the invocation of the function
ExecutorStart() which calls CreateExecutorState() and then ExecInitNode()
Is this right? At the ExecInitNode() I checked the messages "unrecognized 
node type" and I saw that the ERROR happens before this part of code.
Can you please suggest were to look?Any idea? It's looks like that I miss 
something :).
thanks !! 
-martha mc 
---------------------------------------------------------------
mchron@aueb.gr writes: 

>> The problem is that while, Im running the postgres with gdb and I 
>

set a 

>> breakpoint at the function
>> create_plan() of createplan.c, after some step commands,the gdb says 
>

that it 

>> cant recongnize
>> the node 121 in the PostgresMain() function. 
> 
>

That's not what gdb said at all; all you know is that the error
happened
someplace where you didn't have control.  (My bet is that control got
as
far as executor startup, which you already said you hadn't fixed to
understand this new node type, so the error is exactly what I'd
expect.) 

Perhaps you should rebuild the backend with -g (see --enable-debug) so
that gdb can actually be somewhat helpful.  It's usually a good idea to
have --enable-cassert turned on when hacking C code, too. 

FWIW, I don't personally ever do debugging in a standalone backend,
unless the problem is one that keeps a normal backend from starting.
It's much more pleasant to use a regular psql session to issue SQL
commands, and attach to the connected backend with gdb in another
terminal window. 
                      regards, tom lane 




Re: ERROR: unrecognized node type in PostgresMain( )

From
Tom Lane
Date:
mchron@aueb.gr writes:
> Perhaps you should rebuild the backend with -g (see --enable-debug) so
> that gdb can actually be somewhat helpful.  It's usually a good idea to
> have --enable-cassert turned on when hacking C code, too. 

> When I rebuilded the backend with --enable-debug and --enable-cassert
> the database stops and restarts, before it reaches the breakpoint at 
> create_plan() in createplan.c. So I can't figure out what is happening. 
> (errors came out at function Assert()) 

That indicates a problem you need to *fix*, not ignore.
        regards, tom lane