On Tue, Jun 12, 2018 at 12:21 AM, Julien Rouhaud <rjuju...@gmail.com> wrote: > > I both like and dislike this idea. The good thing is that it's way > less hacky than what we did in our prototype, and it's also working > out of the box. However, the problem I have with this approach is > that the generated plans will be quite different from real > partitioning, The main features such as partition pruning or > partition-wise join will probably work, but you'll always have a > ForeignScan as the primary path and I think that it'll drastically > limit the planner and the usability.
AFAIR, there is a hook using which we can change the EXPLAIN output, so we could change the ForeignScan label. But I don't remember that hook top of my head and a brief look at Explain code didn't reveal anything. May be there isn't any hook. We may be able add one in that case or use CustomScan or something like that. I agree that seeing a ForeignScan in the plan is not a good thing. Anyway, the work involved in my proposal may not be worth the utility we get out of this extension, so may not be worth pursuing it further. -- Best Wishes, Ashutosh Bapat EnterpriseDB Corporation The Postgres Database Company