pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martijn van Oosterhout <kleptog@svana.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Ron Peacetree <rjpeace@earthlink.net>
Cc: Jonah H. Harris <jonah.harris@gmail.com>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] A Better External Sort?
Date: Thu, 6 Oct 2005 22:14:47 +0200
Message-ID: <20051006201447.GG10127@svana.org> (raw)
In-Reply-To: <25130.1128628658@sss.pgh.pa.us>
References: <138872.1128556455518.JavaMail.root@elwamui-milano.atl.sa.earthlink.net>
	<20051006165725.GF10127@svana.org>
	<25130.1128628658@sss.pgh.pa.us>

On Thu, Oct 06, 2005 at 03:57:38PM -0400, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.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@svana.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.

view thread (112+ messages)  latest in thread

Message-ID: <20051006201447.GG10127@svana.org>
Permalink:  ../20051006201447.GG10127@svana.org/
Also on:    postgresql.org/message-id/20051006201447.GG10127@svana.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: kleptog@svana.org, tgl@sss.pgh.pa.us, rjpeace@earthlink.net, jonah.harris@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: [PERFORM] A Better External Sort?
  In-Reply-To: <20051006201447.GG10127@svana.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox