Re: A patch for xlog.c

From: Matthew Kirkwood <matthew(at)hairy(dot)beasts(dot)org>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: A patch for xlog.c
Date: 2001-02-24 23:01:06
Message-ID: Pine.LNX.4.10.10102242240090.17152-100000@sphinx.mythic-beasts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthew Kirkwood 2001-02-24 23:45:31 Re: A patch for xlog.c
Previous Message Tom Lane 2001-02-24 22:20:06 Re: A patch for xlog.c

Browse pgsql-patches by date

  From Date Subject
Next Message Matthew Kirkwood 2001-02-24 23:45:31 Re: A patch for xlog.c
Previous Message Tom Lane 2001-02-24 22:20:06 Re: A patch for xlog.c