Re: adding new pages bulky way

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема Re: adding new pages bulky way
Дата
Msg-id d83aj1$nk1$1@news.hub.org
обсуждение исходный текст
Ответ на adding new pages bulky way  ("Victor Y. Yegorov" <viy@mits.lv>)
Ответы Re: adding new pages bulky way  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes
>
> Why bother?  Just write each page when you need to --- there's no law
> that says you must use P_NEW.  The hash index type does something pretty
> similar, IIRC.
>

Is there any performance benefits if we have a mdextend_several_pages()
function in md.c? So the relation can be extended in a bulky way. In my
understanding, if we write
   write(fd, buffer, BLCKSZ*10)

instead of
   for (i=0; i<10; i++)       write(fd, buffer, BLCKSZ);

This will reduce some costs of file system logs for journal file systems. Of
course, the cost we have to pay is the longer time of holding relation
extension lock.

Regards,
Qingqing




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: adding new pages bulky way
Следующее
От: Tom Lane
Дата:
Сообщение: Re: adding new pages bulky way