Re: WIP: Upper planner pathification - Mailing list pgsql-hackers

From Andres Freund
Subject Re: WIP: Upper planner pathification
Date
Msg-id 20160310194109.o3woc6lxmbz3icfn@alap3.anarazel.de
Whole thread Raw
In response to Re: WIP: Upper planner pathification  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP: Upper planner pathification
Re: WIP: Upper planner pathification
List pgsql-hackers
On 2016-03-10 14:16:03 -0500, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > In Citus' case a full PlannedStmt is generated on the master node, to
> > combine the data generated on worker nodes (where the bog standard
> > postgres planner is used).  It's not the only way to do things, but I
> > don't see why the approach would be entirely invalidated by the
> > pathification work.
> 
> I don't deny that you *could* continue to do things that way, but
> I dispute that it's a good idea.  Why can't you generate a Path tree
> and then ask create_plan() to convert it?

Primarily because create_plan(), and/or its children, have to know about
what you're doing; you can hide some, but not all, things below
CustomScan nodes. Secondarily, as an extension you will often have to
support several major versions.

ISTM, that there's good enough reasons to go either way; I don't see
what we're gaining by making these private. That just encourages
copy-paste coding.

Andres



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_rewind just doesn't fsync *anything*?
Next
From: Robert Haas
Date:
Subject: Re: Add generate_series(date,date) and generate_series(date,date,integer)