From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alvaro Herrera Subject: Re: Improve lseek scalability v3 Date: Fri, 16 Sep 2011 14:39:50 -0300 Message-ID: <1316194619-sup-2946@alvh.no-ip.org> References: <1316128013-21980-1-git-send-email-andi@firstfloor.org> <201109161616.50004.andres@anarazel.de> <20110916153620.GA9913@parisc-linux.org> <201109161927.34472.andres@anarazel.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Matthew Wilcox , Andi Kleen , viro , linux-fsdevel , linux-kernel , robertmhaas , Pg Hackers To: Andres Freund Return-path: In-reply-to: <201109161927.34472.andres@anarazel.de> List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Sender: pgsql-hackers-owner@postgresql.org List-Id: linux-fsdevel.vger.kernel.org Excerpts from Andres Freund's message of vie sep 16 14:27:33 -0300 2011: > Hi, > On Friday 16 Sep 2011 17:36:20 Matthew Wilcox wrote: > > Does the query planner need to know the exact number of bytes in the = file, > > or is it after an order-of-magnitude? Or to-the-nearest-gigabyte? > It depends on where the information is used. For some of the uses it ne= eds to=20 > be exact (the assumed size is rechecked after acquiring a lock preventi= ng=20 > extension) at other places I guess it would be ok if the accuracy got l= ower=20 > with bigger files (those files won't ever get bigger than 1GB). One other thing we're interested in is portability. I mean, even if Linux were to introduce a new hypothetical syscall that was able to return the file size at a ridiculously low cost, we probably wouldn't use it because it'd be Linux-specific. So an improvement of lseek() seems to be the best option. --=20 =C3=81lvaro Herrera The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers