pgsql: Request small targetlist for input to WindowAgg.

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема pgsql: Request small targetlist for input to WindowAgg.
Дата
Msg-id E1iSDRZ-00043z-St@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f57c63107007f3b9333d270473b9070225c23843

Modified Files
--------------
src/backend/optimizer/plan/createplan.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: pgsql: doc: Further clarify how recovery target parameters are applied
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Fix timestamp of sent message for write context in logical decod