X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 85672DA40B; Thu, 6 Oct 2005 17:17:26 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 39355-09; Thu, 6 Oct 2005 20:17:20 +0000 (GMT) Received: from mx1.surnet.cl (mx1.surnet.cl [216.155.73.180]) by svr1.postgresql.org (Postfix) with ESMTP id 21CB2DA430; Thu, 6 Oct 2005 17:17:20 -0300 (ADT) Received: from unknown (HELO cluster.surnet.cl) ([216.155.73.165]) by mx1.surnet.cl with ESMTP; 06 Oct 2005 16:18:02 -0400 Received: from alvh.no-ip.org (216.155.86.150) by cluster.surnet.cl (7.0.043) (authenticated as alvherre@surnet.cl) id 433A601F0020AD5A; Thu, 6 Oct 2005 16:17:21 -0400 Received: by alvh.no-ip.org (Postfix, from userid 1000) id BEB74C2DC18; Thu, 6 Oct 2005 16:17:21 -0400 (CLT) Date: Thu, 6 Oct 2005 16:17:21 -0400 From: Alvaro Herrera To: Tom Lane Cc: Martijn van Oosterhout , Ron Peacetree , "Jonah H. Harris" , pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org Subject: Re: [HACKERS] A Better External Sort? Message-ID: <20051006201721.GB6513@surnet.cl> Mail-Followup-To: Tom Lane , Martijn van Oosterhout , Ron Peacetree , "Jonah H. Harris" , pgsql-hackers@postgresql.org, pgsql-performance@postgresql.org References: <138872.1128556455518.JavaMail.root@elwamui-milano.atl.sa.earthlink.net> <20051006165725.GF10127@svana.org> <25130.1128628658@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <25130.1128628658@sss.pgh.pa.us> User-Agent: Mutt/1.5.10i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.833 required=5 tests=[AWL=0.083, DNS_FROM_RFC_ABUSE=0.374, DNS_FROM_RFC_POST=1.376] X-Spam-Level: * X-Archive-Number: 200510/130 X-Sequence-Number: 14898 On Thu, Oct 06, 2005 at 03:57:38PM -0400, Tom Lane wrote: > Martijn van Oosterhout 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. > > And I don't think autoconf has any way to determine whether a libc > function represents a native kernel call or not ... The problem kernels would be Linux 2.0, which I very much doubt is going to be present in to-be-deployed database servers. Unless someone runs glibc on top of some other kernel, I guess. Is this a common scenario? I've never seen it. -- Alvaro Herrera http://www.amazon.com/gp/registry/DXLWNGRJD34 Oh, oh, las chicas galacianas, lo harán por las perlas, ˇY las de Arrakis por el agua! Pero si buscas damas Que se consuman como llamas, ˇPrueba una hija de Caladan! (Gurney Halleck)