Re: On disable_cost

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Rowley <dgrowleyml(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: On disable_cost
Date: 2024-09-09 04:09:26
Message-ID: CAMbWs48RSWPEK9HOw6sFP2EmGfDQFztX2fKCU-asyJgPZmZ=mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 6, 2024 at 5:27 PM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> On Fri, Sep 6, 2024 at 5:00 PM Alexander Lakhin <exclusion(at)gmail(dot)com> wrote:
> > static void
> > label_sort_with_costsize(PlannerInfo *root, Sort *plan, double limit_tuples)
> > {
> > ...
> > cost_sort(&sort_path, root, NIL,
> > lefttree->total_cost,
> > plan->plan.disabled_nodes,
> > lefttree->plan_rows,
> > lefttree->plan_width,
> > 0.0,
> > work_mem,
> > limit_tuples);
> >
> > Given the cost_sort() declaration:
> > void
> > cost_sort(Path *path, PlannerInfo *root,
> > List *pathkeys, int input_disabled_nodes,
> > Cost input_cost, double tuples, int width,
> > Cost comparison_cost, int sort_mem,
> > double limit_tuples)
> >
> > Aren't the input_disabled_nodes and input_cost arguments swapped in the
> > above call?
>
> Nice catch! I checked other callers to cost_sort, and they are all
> good.

Fixed.

Thanks
Richard

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey M. Borodin 2024-09-09 04:42:57 Re: Sort functions with specialized comparators
Previous Message shveta malik 2024-09-09 03:47:30 Re: Introduce XID age and inactive timeout based replication slot invalidation