Re: [GENERAL] Some Solaris notes, and an invitation - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [GENERAL] Some Solaris notes, and an invitation
Date
Msg-id 200207191843.g6JIhVS05281@candle.pha.pa.us
Whole thread Raw
In response to Re: [GENERAL] Some Solaris notes, and an invitation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > The following diff adds the NetBSD qsort() for all Solaris platforms.
>
> Do we know that Solaris is the only platform with the problem?
>
> In the back of my mind is the thought that if we used this qsort on
> *all* platforms, we'd eliminate some platform-to-platform sort ordering
> differences that occasionally cause regression test problems.  And I
> see little downside to using it everywhere.

That's a tough call. I am hesitant to replace qsort on platforms where
it is known to be working.  If an OS has some platform-specific
optimized qsort, our replacing it could cause problems.  Not sure how
likely that is to have happened, but Solaris clearly broke theirs so
someone must be modifying libc qsort somewhere.  In fact, some qsorts
are not even quicksort, so I tend to defer to the libc authors to
provide the best qsort for their platform.  In fact, this email suggests
there is quite a bit of variation in qsort implementations:

    http://www.dietlibc.org/mailinglists/dietlibc/2001/12-2001/msg00024.html

I don't think we can replace library functions unless we know they are
broken or missing, or if several people using the OS agree with the
replacement, as they have on Solaris.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Some Solaris notes, and an invitation
Next
From: nconway@klamath.dyndns.org (Neil Conway)
Date:
Subject: Re: prepareable statements