Re: [PROPOSAL] : Use of ORDER BY clause in insert.sql - Mailing list pgsql-hackers

From Amul Sul
Subject Re: [PROPOSAL] : Use of ORDER BY clause in insert.sql
Date
Msg-id CAAJ_b94-3BaqVrYD4irUGFAEmYLR2Xy7aXdTuxvdCoLtHw87vQ@mail.gmail.com
Whole thread Raw
In response to Re: [PROPOSAL] : Use of ORDER BY clause in insert.sql  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PROPOSAL] : Use of ORDER BY clause in insert.sql  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On Thu, Oct 27, 2022 at 6:54 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Nishant Sharma <nishant.sharma@enterprisedb.com> writes:
> > We would like to share a proposal of a patch, where we have added order by
> > clause in two select statements in src/test/regress/sql/insert.sql file and
> > respective changes in src/test/regress/expected/insert.out output file.
>
> > This would help in generating output in consistent sequence, as sometimes
> > we have observed change in sequence in output.
>
> Please be specific about the circumstances in which the output is
> unstable for you.  With zero information to go on, it seems about as
> likely that this change is masking a bug as that it's a good idea.
>

At the first glance, I thought the patch is pretty much obvious, and
we usually add an ORDER BY clause to ensure stable output.   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?

I have tested on my Centos and the Mac OS, insert.sql test is giving
stable output, I didn't find failure in the subsequent runs too but I
am not sure if that is enough evidence to skip the ORDER BY clause.

Regards,
Amul



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Allow file inclusion in pg_hba and pg_ident files
Next
From: Thomas Munro
Date:
Subject: Latches vs lwlock contention