make Gather node projection-capable - Mailing list pgsql-hackers

From Robert Haas
Subject make Gather node projection-capable
Date
Msg-id CA+TgmobQnvm34ZSmZdQVGVS7uizpVHrb3TCHYoutuhu-gJWyJw@mail.gmail.com
Whole thread Raw
Responses Re: make Gather node projection-capable  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
The Gather node, as currently committed, is neither projection-capable
nor listed as an exception in is_projection_capable_plan.  Amit
discovered this in testing, and I hit it in my testing as well.  We
could just mark it as being not projection-capable, but I think it
might be better to go the other way and give it projection
capabilities.  Otherwise, we're going to start generating lots of
plans like this:

Result
-> Gather
  -> Partial Seq Scan

While that's not the end of the world, it seems to needlessly fly in
the face of the general principle that nodes should generally try to
support projection.  So attached is a patch to make Gather
projection-capable (gather-project.patch).  It has a slight dependency
on my patch to fix up the tqueue machinery for record types, so I've
attached that patch here as well (tqueue-record-types.patch).

Comments?  Reviews?

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

Attachment

pgsql-hackers by date:

Previous
From: YUriy Zhuravlev
Date:
Subject: Re: clearing opfuncid vs. parallel query
Next
From: Robert Haas
Date:
Subject: Re: clearing opfuncid vs. parallel query