Re: Expression Evaluator used for creating the plan tree / stmt ?

From: Vaibhav Kaushal <vaibhavkaushal123(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Expression Evaluator used for creating the plan tree / stmt ?
Date: 2011-05-27 03:33:47
Message-ID: BANLkTinBetAjvtK5r8rj6UdW8ZWcm+9btQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

OK, I ran a GDB trace into ExecScan and here is a part of it:

#########################

(gdb) finish
Run till exit from #0 ExecScanFetch (node=0x1d5c3c0,
accessMtd=0x55dd10 <SeqNext>, recheckMtd=0x55db70 <SeqRecheck>)
at execScan.c:44
194 if (TupIsNull(slot))
(gdb) s
205 econtext->ecxt_scantuple = slot;
(gdb) s
206 int num_atts = slot->tts_tupleDescriptor->natts;
(gdb) s
207 elog(INFO, "========[start] BEFORE ExecQual===========");
(gdb) s
206 int num_atts = slot->tts_tupleDescriptor->natts;
(gdb) s
207 elog(INFO, "========[start] BEFORE ExecQual===========");
(gdb) s
elog_start (filename=0x7c9db2 "execScan.c", lineno=207,
funcname=0x7c9e69 "ExecScan") at elog.c:1089
1089 {
(gdb)

##########################

Why do these lines:

########################

206 int num_atts = slot->tts_tupleDescriptor->natts;
(gdb) s
207 elog(INFO, "========[start] BEFORE ExecQual===========");

########################

repeat twice? I have written them only once! GDB documentation does not
help! A few forums I am on, people accuse me of anything between bad
programming to recursion. Any idea? I never face this with rest of the code
(and in no other program). I am on Fedora 13 X86_64.

Regards,
Vaibhav

On Wed, May 25, 2011 at 11:45 PM, Vaibhav Kaushal <
vaibhavkaushal123(at)gmail(dot)com> wrote:

> I think the command 'where' does the same. And the command showed something
> which looked like was part of evaluation...it got me confused. Anyways,
> thanks robert. I will check that too. I did not know the 'bt' command.
>
> --
> Sent from my Android
> On 25 May 2011 23:02, "Robert Haas" <robertmhaas(at)gmail(dot)com> wrote:
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2011-05-27 03:36:53 Re: Pre-alloc ListCell's optimization
Previous Message Greg Stark 2011-05-27 03:32:26 Re: Pre-alloc ListCell's optimization