From: | Christopher Kings-Lynne <chris(dot)kings-lynne(at)calorieking(dot)com> |
---|---|
To: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | sync_file_range() |
Date: | 2006-06-19 05:46:30 |
Message-ID: | 44963A36.4090606@calorieking.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
http://lwn.net/Articles/178199/
Check out the article on sync_file_range():
----
long sync_file_range(int fd, loff_t offset, loff_t nbytes, int flags);
This call will synchronize a file's data to disk, starting at the given
offset and proceeding for nbytes bytes (or to the end of the file if
nbytes is zero). How the synchronization is done is controlled by flags:
* SYNC_FILE_RANGE_WAIT_BEFORE blocks the calling process until any
already in-progress writeout of pages (in the given range) completes.
* SYNC_FILE_RANGE_WRITE starts writeout of any dirty pages in the
given range which are not already under I/O.
* SYNC_FILE_RANGE_WAIT_AFTER blocks the calling process until the
newly-initiated writes complete.
An application which wants to initiate writeback of all dirty pages
should provide the first two flags. Providing all three flags guarantees
that those pages are actually on disk when the call returns.
----
Is that at all useful for PostgreSQL's purposes?
Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Qingqing Zhou | 2006-06-19 05:47:27 | Re: kill_prior_tuple for bitmap scan |
Previous Message | ITAGAKI Takahiro | 2006-06-19 05:36:28 | Re: table/index fillfactor control, try 2 |