Re: Source Code Help Needed

From: Vikram Kalsi <vikramkalsi(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Source Code Help Needed
Date: 2005-05-26 00:20:09
Message-ID: ed5f0fd7050525172076e559e3@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks Tom, that solved it...I added the new variables one at a time
and did do a "make clean" on the first occasion but I must have
forgotten to do it the second time...

I have another question-
The new variables that I've added to Plan and Path i.e.
hutz_tbl_benefit and hutz_idx_benefit are being assigned values inside
cost_seqscan() and cost_index() in costsize.c and this is done
alongside startup_cost and total_cost.

But, when I read the value of hutz_tbl_benefit and hutz_idx_benefit
inside pg_plan_query() or later at the execution stage inside
ExecProcNode(), the value is absent, but startup_cost and total_cost
retain their values.

So, I suppose that during the query planning and optimization stage,
the value of the original variables in the plan are somehow copied to
the plan which is finally returned inside pg_plan_query().

Could somebody direct me to the appropriate code/function(s) which
does this copying so that I can add hutz_tbl_benefit and
hutz_idx_benefit to that as well.

Thanks in anticipation,
Regards,

On 5/25/05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Vikram Kalsi <vikramkalsi(at)gmail(dot)com> writes:
> > 1.) New Variables ADDED to src/include/nodes/plannodes.h
> > 2.) New Variables ADDED to src/include/nodes/relation.h
> > ...
> > However, after these modifications the server process crashes on
> > running a Join query like
> > "select s_suppkey,c_custkey from supplier,customer where s_suppkey>125
> > and s_suppkey<128 and c_custkey>100 and c_custkey<103 and
> > c_custkey=s_suppkey"
>
> Did you do a full recompile (make clean and rebuild) after modifying
> these widely-known structures?
>
> Unless you configured with --enable-depend, you can't expect that plain
> "make" will recompile everything that needs recompiled.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jaime Casanova 2005-05-26 00:32:10 Re: adding a function to pg_proc.h
Previous Message Tom Lane 2005-05-25 23:46:07 Re: adding a function to pg_proc.h