Re: adding support for posix_fadvise() - Mailing list pgsql-hackers

From Neil Conway
Subject Re: adding support for posix_fadvise()
Date
Msg-id 1067878764.3089.369.camel@tokyo
Whole thread Raw
In response to Re: adding support for posix_fadvise()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: adding support for posix_fadvise()  (Hannu Krosing <hannu@tm.ee>)
Re: adding support for posix_fadvise()  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, 2003-11-03 at 11:11, Tom Lane wrote:
> Why not?  The advice says that you're going to access the data
> sequentially in the forward direction.  If you're not going to back up,
> there is no point in keeping pages in cache after they've been read.

The advice says: "I'm going to read this data sequentially, going
forward." It doesn't say: "I'm only going to read the data once, and
then not access it again" (ISTM that's what FADV_NOREUSE is for). For
example, the following is a perfectly reasonable sequential access
pattern:
a,b,c,a,b,c,a,b,c,a,b,c

(i.e. repeatedly scanning through a large file, say for a data-analysis
app that does multiple passes over the input data). It might not be a
particularly common database reference pattern, but just because an app
is doing a sequential read says little about the temporal locality of
references to the pages in question.

-Neil




pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Experimental patch for inter-page delay in VACUUM
Next
From: Christopher Browne
Date:
Subject: RC1 on AIX - working thus far