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 <t...@sss.pgh.pa.us> wrote:

> Vaibhav Kaushal <vaibhavkaushal...@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
>

Reply via email to