Re: adding new pages bulky way - Mailing list pgsql-hackers

From Qingqing Zhou
Subject Re: adding new pages bulky way
Date
Msg-id d83aj1$nk1$1@news.hub.org
Whole thread Raw
In response to adding new pages bulky way  ("Victor Y. Yegorov" <viy@mits.lv>)
Responses Re: adding new pages bulky way
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: adding new pages bulky way
Next
From: Tom Lane
Date:
Subject: Re: adding new pages bulky way