Re: A patch for xlog.c

Поиск
Список
Период
Сортировка
От Matthew Kirkwood
Тема Re: A patch for xlog.c
Дата
Msg-id Pine.LNX.4.10.10102242240090.17152-100000@sphinx.mythic-beasts.com
обсуждение исходный текст
Ответ на Re: A patch for xlog.c  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: A patch for xlog.c
Следующее
От: Matthew Kirkwood
Дата:
Сообщение: Re: A patch for xlog.c