Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group