Re: BUG #18092: Unexpected Result by enable_seqscan

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: BUG #18092: Unexpected Result by enable_seqscan
Дата
Msg-id CAApHDvrGABU272MSLFVn0nirf_7HuJttYsJay-ij=GCa8WAD1w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18092: Unexpected Result by enable_seqscan  (Francisco Olarte <folarte@peoplecall.com>)
Список pgsql-bugs
On Thu, 7 Sept 2023 at 19:35, Francisco Olarte <folarte@peoplecall.com> wrote:
>
> On Thu, 7 Sept 2023 at 09:10, PG Bug reporting form
> > SET enable_seqscan=on;
> > SELECT DISTINCT ON (v0.c0) t0.c0 FROM v0, t0; -- {0.8}
> > SET enable_seqscan=false;
> > SELECT DISTINCT ON (v0.c0) t0.c0 FROM v0, t0; -- {0.1}
>
> This seems a variation of your previous report. To me your queries
> looks like you are asking Pg to "give me any row from this sets" and
> then complaining when it does not give you the same under different
> conditions.

Yeah, I agree. This seems documented in [1]:

"Note that the “first row” of each set is unpredictable unless ORDER
BY is used to ensure that the desired row appears first."

David

[1] https://www.postgresql.org/docs/15/sql-select.html#SQL-DISTINCT



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: FW: query pg_stat_ssl hang 100%cpu
Следующее
От: "Zhijie Hou (Fujitsu)"
Дата:
Сообщение: RE: BUG #18055: logical decoding core on AllocateSnapshotBuilder()