Re: Expression Evaluator used for creating the plan tree / stmt ? - Mailing list pgsql-hackers

From Vaibhav Kaushal
Subject Re: Expression Evaluator used for creating the plan tree / stmt ?
Date
Msg-id BANLkTimXMzcjZNWHP6+CTuv9esow6WAL8w@mail.gmail.com
Whole thread Raw
In response to Re: Expression Evaluator used for creating the plan tree / stmt ?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Thanks Tom. Comparing to you people, I am definitely new to almost everything here. I did debug a few smaller programs and never seen anything as such. So asked. Moreover, those programs I compiled never used any optimization. 

While everything seems to be working, it looks like the slot values do not change and all rows in a sequential scan return the first value it finds on the disk, n number of times, where n = number of rows in the table! I am going to compile without optimization now. Hopefully that would change a few things in the debugging process. 

Seems beautiful, complicated, mysterious. And I thought I was beginning to understand computers. :)

Whatever be the case, I will look more into it and ask again if I get into too much of trouble. 

Regards,
Vaibhav

On Fri, May 27, 2011 at 9:18 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Vaibhav Kaushal <vaibhavkaushal123@gmail.com> writes:
> Why do these lines:
> ...
> repeat twice?

Hm, you're new to using gdb, no?  That's pretty normal: gdb is just
reflecting back the fact that the compiler rearranges individual
instructions as it sees fit.  You could eliminate most, though perhaps
not all, of that noise if you built the program-under-test (ie postgres)
at -O0.

                       regards, tom lane

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Pre-alloc ListCell's optimization
Next
From: Greg Stark
Date:
Subject: Re: Pre-alloc ListCell's optimization