Re: add_partial_path() may remove dominated path but still in use - Mailing list pgsql-hackers

From Tom Lane
Subject Re: add_partial_path() may remove dominated path but still in use
Date
Msg-id 6777.1546110775@sss.pgh.pa.us
Whole thread Raw
In response to Re: add_partial_path() may remove dominated path but still in use  (Kohei KaiGai <kaigai@heterodb.com>)
Responses Re: add_partial_path() may remove dominated path but still in use
List pgsql-hackers
Kohei KaiGai <kaigai@heterodb.com> writes:
> 2018年12月29日(土) 1:44 Tom Lane <tgl@sss.pgh.pa.us>:
>> However, first I'd like to know why this situation is arising in the first
>> place.  To have the situation you're describing, we'd have to have
>> attempted to make some Gather paths before we have all the partial paths
>> for the relation they're for.  Why is that a good thing to do?  It seems
>> like such Gathers are necessarily being made with incomplete information,
>> and we'd be better off to fix things so that none are made till later.

> Because of the hook location, Gather-node shall be constructed with built-in
> and foreign partial scan node first, then extension gets a chance to add its
> custom paths (partial and full).
> At the set_rel_pathlist(), set_rel_pathlist_hook() is invoked next to the
> generate_gather_paths().

Hmm.  I'm inclined to think that we should have a separate hook
in which extensions are allowed to add partial paths, and that
set_rel_pathlist_hook should only be allowed to add regular paths.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Poor buildfarm coverage of strong-random alternatives
Next
From: Tom Lane
Date:
Subject: Re: random() (was Re: New GUC to sample log queries)