Re: BUG #17084: Wrong results of distinct node.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #17084: Wrong results of distinct node.
Дата
Msg-id 1679023.1625585130@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #17084: Wrong results of distinct node.  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> During investigation of weird app behaviour I found very strange results
> with sorting/dising of some dataset.

I am not sure there is a PG bug here.  Your query is doing DISTINCT
on (among other things)

>             array_agg(geo_id) AS geo_ids

which is going to have results that vary depending on the unspecified
order in which the first-level aggregation is done.  So you might
by luck have more or fewer distinct array values with different
plans.

If you still get unstable results after changing that to, say,

              array_agg(geo_id order by geo_id) AS geo_ids

then I'd agree we need to investigate.

            regards, tom lane



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

Предыдущее
От: Pantelis Theodosiou
Дата:
Сообщение: Re: BUG #17084: Wrong results of distinct node.
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #17061: Impossible to query the fields of the tuple created by SEARCH BREADTH FIRST BY .. SET ..