Re: Planner question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tom Raney <raneyt(at)cecs(dot)pdx(dot)edu>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Planner question
Date: 2008-08-13 03:07:47
Message-ID: 7899.1218596867@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Raney <raneyt(at)cecs(dot)pdx(dot)edu> writes:
> My question is: How would I let the planner know when a planner session
> has been invoked by the "explain" command? If I can slip a flag into
> PlannerInfo or PlannerGlobal, that would be perfect. But, I'm a bit
> stuck on how to get explain context to that point. I don't want to
> modify the planner() entry function parameter list, unless absolutely
> necessary.

Slip another flag bit into cursorOptions, perhaps? There's certainly
lots of room there.

Not that planner() is called from so many places that adding another
parameter would be out of the question. ISTM you'd have to do something
nearly as invasive to add the downstream flag to PlannerGlobal anyway,
because the only people that are likely to be seriously affected by a
change in planner()'s API would be people plugging into planner_hook,
and they'd be affected by PlannerGlobal changes too.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-08-13 03:22:16 Re: SeqScan costs
Previous Message Tom Lane 2008-08-13 03:00:13 Re: pgbench duration option