Re: [HACKERS] Decent VACUUM (was: Buglist) - Mailing list pgsql-general

From Curt Sampson
Subject Re: [HACKERS] Decent VACUUM (was: Buglist)
Date
Msg-id Pine.NEB.4.51.0308261359050.2127@angelic-vtfw.cvpn.cynic.net
Whole thread Raw
In response to Re: Decent VACUUM (was: Buglist)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Thu, 21 Aug 2003, Tom Lane wrote:

> We have had some people looking at improved buffer management
> algorithms; LRU-2 or something smarter would help.  I dunno whether
> we can dissuade the kernel from flushing its cache though.

Using open/read/write system calls, you can't. You can always use an OS
like Solaris that should detect the sequential read, however, and avoid
blowing out the buffer cache.

Most operating systems support the madvise system call, which does let
you do things like say, "I'm accessing this sequentially" and "I don't
need this to be buffered any more," though how much attention most
operating systems pay to this advice varies with the OS. However, it
turns out to be non-trivial to get postgres to use mmap for data blocks,
since you can't actually write any data to a mmmap'd block until you've
confirmed that the log entry has been written, because once you've
touched data in an mmaped block you have no way of stopping it from
being written to the disk right away.

cjs
--
Curt Sampson  <cjs@cynic.net>   +81 90 7737 2974   http://www.NetBSD.org
    Don't you know, in this new Dark Age, we're all light.  --XTC

pgsql-general by date:

Previous
From: CoL
Date:
Subject: Re: merge multiple records into 1
Next
From: "Chris M"
Date:
Subject: Re: table constraints and performance