pgsql: Fix bug #16784 in Disk-based Hash Aggregation.

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема pgsql: Fix bug #16784 in Disk-based Hash Aggregation.
Дата
Msg-id E1ktLFB-0008Uv-CG@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Fix bug #16784 in Disk-based Hash Aggregation.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
Fix bug #16784 in Disk-based Hash Aggregation.

Before processing tuples, agg_refill_hash_table() was setting all
pergroup pointers to NULL to signal to advance_aggregates() that it
should not attempt to advance groups that had spilled.

The problem was that it also set the pergroups for sorted grouping
sets to NULL, which caused rescanning to fail.

Instead, change agg_refill_hash_table() to only set the pergroups for
hashed grouping sets to NULL; and when compiling the expression, pass
doSort=false.

Reported-by: Alexander Lakhin
Discussion: https://postgr.es/m/16784-7ff169bf2c3d1588%40postgresql.org
Backpatch-through: 13

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/05c0258966b502fae1bd63dcbe74d52f5c6f6948

Modified Files
--------------
src/backend/executor/nodeAgg.c             |  24 +++-
src/test/regress/expected/groupingsets.out | 207 +++++++++++++++++++++++++++++
src/test/regress/sql/groupingsets.sql      |  21 +++
3 files changed, 245 insertions(+), 7 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Add pg_alterckey utility to change the cluster key
Следующее
От: Jeff Davis
Дата:
Сообщение: pgsql: Fix bug #16784 in Disk-based Hash Aggregation.