Re: failures with tuplesort and ordered set aggregates (due to 5cefbf5a6c44)

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: failures with tuplesort and ordered set aggregates (due to 5cefbf5a6c44)
Дата
Msg-id CAM3SWZSm4GyfjBN1VmzzbtPXK7N53LVEKprJwkW8LBc=UkAMHg@mail.gmail.com
обсуждение исходный текст
Ответ на failures with tuplesort and ordered set aggregates (due to 5cefbf5a6c44)  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: failures with tuplesort and ordered set aggregates (due to 5cefbf5a6c44)
Список pgsql-hackers
On Fri, Feb 20, 2015 at 11:58 AM, Tomas Vondra
<tomas.vondra@2ndquadrant.com> wrote:
> This seems to happen because ordered_set_startup() calls
> tuplesort_begin_datum() when (use_tuples == true), which only sets
> 'onlyKey' and leaves (sortKeys == NULL). So 'mergeruns' fails because it
> does not expect that.

Oops. You're right. Attached patch fixes the issue, by making
tuplesort_begin_datum() consistent with other comparable routines for
other tuple cases. I think it makes sense to have the 'sortKeys' field
always set, and the 'onlyKey' field also set when that additional
optimization makes sense. That was what I understood the API to be, so
arguably this is a pre-existing issue with tuplesort_begin_datum().

Thanks for the report!
--
Peter Geoghegan

Вложения

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Re: Abbreviated keys for Datum tuplesort
Следующее
От: Eric Grinstein
Дата:
Сообщение: Idea: GSoC - Query Rewrite with Materialized Views