Re: Improve lseek scalability v3

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Improve lseek scalability v3
Дата
Msg-id 1316194619-sup-2946@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Improve lseek scalability v3  (Andres Freund <andres@anarazel.de>)
Ответы Re: Improve lseek scalability v3
Список pgsql-hackers
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 needs to 
> be exact (the assumed size is rechecked after acquiring a lock preventing 
> extension) at other places I guess it would be ok if the accuracy got lower 
> 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.

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Improve lseek scalability v3
Следующее
От: Alex Hunsaker
Дата:
Сообщение: Re: /proc/self/oom_adj is deprecated in newer Linux kernels