From: | Amul Sul <sulamul(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David Rowley <dgrowleyml(at)gmail(dot)com>, Nishant Sharma <nishant(dot)sharma(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [PROPOSAL] : Use of ORDER BY clause in insert.sql |
Date: | 2022-10-28 05:53:55 |
Message-ID: | CAAJ_b95+De1PRHSeX_nbLcvMNqB0yEUB3Co7X2uzvquR299iCw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 28, 2022 at 10:43 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> David Rowley <dgrowleyml(at)gmail(dot)com> writes:
> > On Fri, 28 Oct 2022 at 16:51, Amul Sul <sulamul(at)gmail(dot)com> wrote:
> >> If we
> >> are too sure that the output usually comes in the same order then the
> >> ORDER BY clause that exists in other tests seems useless. I am a bit
> >> confused & what could be a possible bug?
>
> > You can't claim that if this test shouldn't get an ORDER BY that all
> > tests shouldn't have an ORDER BY. That's just crazy. What if the test
> > is doing something like testing sort?!
>
> The general policy is that we'll add ORDER BY when a test is demonstrated
> to have unstable output order for identifiable environmental reasons
> (e.g. locale dependency) or timing reasons (e.g. background autovacuum
> sometimes changing statistics). But the key word there is "identifiable".
> Without some evidence as to what's causing this, it remains possible
> that it's a code bug not the fault of the test case.
>
> regress.sgml explains the policy further:
>
> You might wonder why we don't order all the regression test queries explicitly
> to get rid of this issue once and for all. The reason is that that would
> make the regression tests less useful, not more, since they'd tend
> to exercise query plan types that produce ordered results to the
> exclusion of those that don't.
>
Understood. Thanks for the clarification.
Regards,
Amul
From | Date | Subject | |
---|---|---|---|
Next Message | Bharath Rupireddy | 2022-10-28 06:08:51 | Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes? |
Previous Message | Amul Sul | 2022-10-28 05:53:23 | Re: [PROPOSAL] : Use of ORDER BY clause in insert.sql |