Re: Question about commit 11cf92f6e2e13c0a6e3f98be3e629e6bd90b74d5 - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Question about commit 11cf92f6e2e13c0a6e3f98be3e629e6bd90b74d5
Date
Msg-id CA+TgmobZ3Ky7vWTze8NS6DbAo9Jdgq8cQq84p-_8dFyzW0oY8g@mail.gmail.com
Whole thread Raw
In response to Re: Question about commit 11cf92f6e2e13c0a6e3f98be3e629e6bd90b74d5  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-hackers
On Tue, Mar 5, 2019 at 3:00 AM Etsuro Fujita
<fujita.etsuro@lab.ntt.co.jp> wrote:
> apply_projection_to_path() not only jams the given tlist into the
> existing path but updates its tlist eval costs appropriately except for
> the cases of Gather and GatherMerge:

I had forgotten that detail, but I don't think it changes the basic
picture.  Once you've added a bunch of Paths to a RelOptInfo, it's too
late to change their *relative* cost, because add_path() puts the list
in a certain order, and adjusting the path costs won't change that
ordering.  You've got to have the costs already correct at the time
add_path() is first called for any given Path.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Jesper Pedersen
Date:
Subject: Re: speeding up planning with partitions
Next
From: Shawn Debnath
Date:
Subject: Re: Refactoring the checkpointer's fsync request queue