Re: sync_file_range() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: sync_file_range()
Date
Msg-id 27505.1150811544@sss.pgh.pa.us
Whole thread Raw
In response to Re: sync_file_range()  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> So we would use the async properties of sync, but not the file range
> support?

That's the part of it that looked potentially useful to me, anyway.
I don't see any value for us in syncing just part of a file, because
we don't have enough disk layout knowledge to make intelligent choices
of what to sync.  I think the OP had some idea of having the bgwriter
write and then force-sync individual pages, but what good is that?
Once we've done the write() the page is exposed to the kernel's write
scheduler and should be written at an intelligent time.  Trying to
force sync in advance of our own real need for it to be synced (ie
the next checkpoint) doesn't seem to me to offer any benefit.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: shall we have a TRACE_MEMORY mode
Next
From: Tom Lane
Date:
Subject: Re: sync_file_range()