From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [Proposal] Make the optimiser aware of partitions ordering |
Date: | 2017-09-23 10:29:05 |
Message-ID: | CAOBaU_ast+7N6d3Ue3BNidcscPnV8kxGfu7uR4zb+RYpEsV1aQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Sep 22, 2017 at 11:09 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> During planning, *every* node has a list of pathkeys associated with
> it which represent the presumed output ordering. You can support
> ordered append paths without changing any data structures at all; it's
> just a matter of putting pathkeys into an AppendPath.
>
I totally agree.
> The reason why MergeAppend has extra stuff in the node (numCols,
> sortColIdx, etc.) is so that it can actually perform the sort at
> runtime. But this feature requires no runtime support -- that's kinda
> the point -- so there's no need for it to carry that information, or
> to add any new nodes.
>
> At least, IIUC.
That's true, but numCols, sortColdIdx etc are also used to display the
sort key in an explain. If an append can return sorted data, it
should also display the sort information, so I think these fields are
still required in an Append node.
If it's ok to only add these fields in an Append node for the explain
part, I'll revert the Append/MergeAppend refactoring and do some other
cleanup as you advised earlier.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2017-09-23 10:30:50 | Re: Rethinking autovacuum.c memory handling |
Previous Message | Michael Paquier | 2017-09-23 10:26:25 | Re: Rethinking autovacuum.c memory handling |