Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable
Дата
Msg-id 25718.1201640449@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable  (Ron Mayer <rm_pg@cheapcomplexdevices.com>)
Список pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote: 
>> Or is someone prepared to argue that there are no applications out
>> there that will be broken if the same query, against the same unchanging
>> table, yields different results from one trial to the next?
> If geqo kicks in, we're already there, aren't we?

Yup, and that's one of the reasons we have a way to turn geqo off.
(geqo is actually a good precedent for this --- notice that it has
an on/off switch that's separate from its tuning knobs.)

> Isn't an application which counts on the order of result rows
> without specifying ORDER BY fundamentally broken?

No doubt, but if it's always worked before, people are going to be
unhappy anyway.

Also, it's not just ordering that's at stake.  Try

regression=# create table foo as select x from generate_series(1,1000000) x;
SELECT
regression=# select * from foo limit 10000;  x   
-------    1    2    3    4....
regression=# select * from foo limit 10000;  x   
------- 7233 7234 7235 7236 ....
regression=# select * from foo limit 10000;  x   
-------14465144661446714468....

Now admittedly we've never promised LIMIT without ORDER BY to be
well-defined either, but not everybody reads the fine print.
This case is particularly nasty because at smaller LIMIT values
the result *is* consistent, so you might never notice the problem
while testing.
        regards, tom lane


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: [PATCHES] Proposed patch: synchronized_scanning GUCvariable
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Transition functions for SUM(::int2), SUM(::int4, SUM(::int8])