Re: A patch for xlog.c - Mailing list pgsql-patches

From Matthew Kirkwood
Subject Re: A patch for xlog.c
Date
Msg-id Pine.LNX.4.10.10102242240090.17152-100000@sphinx.mythic-beasts.com
Whole thread Raw
In response to Re: A patch for xlog.c  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
On Sat, 24 Feb 2001, Bruce Momjian wrote:

> I am confused why mmap() is better than writing to a real file.

It isn't, except that it allows to initialise the logfile in
one syscall, without first allocating and zeroing (and hence
dirtying) 16Mb of memory.

> Don't we need to write to a real file so it is available for database
> recovery?

The mmap isn't used for the destination, but for the source;
it's just a cheap way to get your hands on 16Mb of zeroes.

Matthew.


pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: A patch for xlog.c
Next
From: Matthew Kirkwood
Date:
Subject: Re: A patch for xlog.c