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

Re: NOT boolfield kills backend

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: NOT boolfield kills backend
Date: 1998-09-23 01:43:31
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> > Debugging patches, ah.  No gdb yet?
> (I see that you fixed it. Great!)
> I just cleaned up a little code; enabling some of the debugging
> statements already in this area caused some breakage. Yeah, I'm now
> gdb-enabled with Postgres, and it is very nice, but not if you don't
> know where the code is headed. I could see the parse tree at the back of
> the parser, and I could see the tree at the executor, but had no idea
> where it went in between. Stepping through code didn't seem like a good
> bet since afaik there are hundreds of calls in between...
>                    - Tom

I suspected the optimizer, and the postmaster -d output showed the parse
and rewrite were ok, but the plan was wrong, so it had to be the
optimizer.  (New debugging levels cause -d 99 to have to be used to see
the query trees.)

I then went to the optimizer and looked for a reference to OP_EXPR,
which is the new value the expression was getting.  I saw it in
make_opclause().   I set a breakpoint on that function and executed the
query inside gdb.  It showed only one call to the function for that
query, and a backtrace on the breakpoint showed flatten_tlistentry()
making the call, and it was clear after that.

Bruce Momjian                          |  830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us              |  Drexel Hill, Pennsylvania 19026              |  (610) 353-9879(w)
  +  If your life is a hard drive,     |  (610) 853-3000(h)
  +  Christ can be your backup.        |

In response to

pgsql-hackers by date

Next:From: The Hermit HackerDate: 1998-09-23 01:46:14
Subject: Re: [HACKERS] Re: Results of port of Sept 18 port of PostgreSQL
Previous:From: Thomas G. LockhartDate: 1998-09-23 01:27:28
Subject: Re: NOT boolfield kills backend

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