Re: Path question

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Hans-Jürgen Schönig <hs@cybertec.at>, Greg Stark <gsstark@mit.edu>, Boszormenyi Zoltan <zb@cybertec.at>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2010-10-13T17:46:09Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Another awkwardness of this patch is that it makes
> create_append_path() and consequently set_dummy_rel_pathlist() take an
> additional "root" argument.  While there's nothing terribly
> unreasonable about this on its face, it's only necessary so that
> create_append_path() can call cost_sort(), which takes "root" but
> doesn't actually use it.  I'm not sure whether it's better to leave
> this as-is or to remove the root argument from cost_sort().

Right offhand the cleanest answer to that seems to be to leave
create_append_path alone, and make a separate function named something
like create_ordered_append_path that handles the case where cost_sort
might be needed.  I rather wonder if we don't want two separate
execution-time node types anyway, since what Append does seems
significantly different from Merge (and MergeAppend would be just a
misnomer).

I have to run off for a doctors appointment, will continue looking at
this patch when I get back.

			regards, tom lane