diff options
author | Andrew Gierth <rhodiumtoad@postgresql.org> | 2019-11-06 04:13:30 +0000 |
---|---|---|
committer | Andrew Gierth <rhodiumtoad@postgresql.org> | 2019-11-06 04:33:42 +0000 |
commit | be99485b94e9f4560f0d8c8f1ed4afc258f75b08 (patch) | |
tree | e7c550de53194b6280e2215094c56fd9fb0a454c /src/include/commands/proclang.h | |
parent | 793739180735a062d9eadec9ad03dbd5db11e5c0 (diff) | |
download | postgresql-be99485b94e9f4560f0d8c8f1ed4afc258f75b08.tar.gz postgresql-be99485b94e9f4560f0d8c8f1ed4afc258f75b08.zip |
Request small targetlist for input to WindowAgg.
WindowAgg will potentially store large numbers of input rows into
tuplestores to allow access to other rows in the frame. If the input
is coming via an explicit Sort node, then unneeded columns will
already have been discarded (since Sort requests a small tlist); but
there are idioms like COUNT(*) OVER () that result in the input not
being sorted at all, and cases where the input is being sorted by some
means other than a Sort; if we don't request a small tlist, then
WindowAgg's storage requirement is inflated by the unneeded columns.
Backpatch back to 9.6, where the current tlist handling was added.
(Prior to that, WindowAgg would always use a small tlist.)
Discussion: https://postgr.es/m/87a7ator8n.fsf@news-spur.riddles.org.uk
Diffstat (limited to 'src/include/commands/proclang.h')
0 files changed, 0 insertions, 0 deletions