Re: [PERFORM] A Better External Sort?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ron Peacetree <rjpeace(at)earthlink(dot)net>, "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] A Better External Sort?
Date: 2005-10-06 20:14:47
Message-ID: 20051006201447.GG10127@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On Thu, Oct 06, 2005 at 03:57:38PM -0400, Tom Lane wrote:
> Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> > Indeed, one of the things on my list is to remove all the lseeks in
> > favour of pread. Halving the number of kernel calls has got to be worth
> > something right? Portability is an issue ofcourse...
>
> Being sure that it's not a pessimization is another issue. I note that
> glibc will emulate these functions if the kernel doesn't have them;
> which means you could be replacing one kernel call with three.

From the linux pread manpage:

HISTORY
The pread and pwrite system calls were added to Linux in version
2.1.60; the entries in the i386 system call table were added in
2.1.69. The libc support (including emulation on older kernels
without the system calls) was added in glibc 2.1.

Are we awfully worried about people still using 2.0 kernels? And it
would replace two calls with three in the worst case, we currently
lseek before every read.

I don't know about other OSes.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2005-10-06 20:17:21 Re: [HACKERS] A Better External Sort?
Previous Message Tom Lane 2005-10-06 19:58:59 Re: comments on prepared transactions ...

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2005-10-06 20:17:21 Re: [HACKERS] A Better External Sort?
Previous Message Tom Lane 2005-10-06 19:57:38 Re: [HACKERS] A Better External Sort?