Re: PG qsort vs. Solaris

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG qsort vs. Solaris
Date: 2006-10-03 20:06:37
Message-ID: 4522C2CD.105@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Neil Conway <neilc(at)samurai(dot)com> writes:
>> Given the time that has been spent working around
>> the braindamaged behavior of qsort() on various platforms, I would be
>> more inclined to *always* use our qsort() instead of the platform's
>> version.
>

<snip>

> I propose that we do the following:
>
> 1. Switch to using port/qsort.c all the time.

1.5 Move it to another directory - e.g. backend/utils/sort?

> 2. Add a "qsort_arg" function that is identical to qsort except it also
> passes a void pointer through to the comparison function. This will
> allow us to get rid of the non-reentrant static variable and extra
> level of function call in tuplesort.c.
> 3. Insert a CHECK_FOR_INTERRUPTS() call as was requested back in July.
> With glibc out of the way, there's no longer a reason to fear memory
> leakage from cancelling a sort.

4. replace KR function definition by the ANSI style :-)

regards Zdenek

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2006-10-03 20:13:20 Re: MSVC build broken (again)
Previous Message Magnus Hagander 2006-10-03 20:01:31 Re: vcbuild bison check