Re: Buffer Management

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Buffer Management
Дата
Msg-id 7498.1025015389@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Buffer Management  (Curt Sampson <cjs@cynic.net>)
Ответы Re: Buffer Management  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Buffer Management  (Curt Sampson <cjs@cynic.net>)
Список pgsql-hackers
Curt Sampson <cjs@cynic.net> writes:
> On Tue, 25 Jun 2002, Tom Lane wrote:
>> The other discussion seemed to be considering how to mmap individual
>> data files right into backends' address space.  I do not believe this
>> can possibly work, because of loss of control over visibility of data
>> changes to other backends, timing of write-backs, etc.

> I don't understand why there would be any loss of visibility of changes.
> If two backends mmap the same block of a file, and it's shared, that's
> the same block of physical memory that they're accessing.

Is it?  You have a mighty narrow conception of the range of
implementations that's possible for mmap.

But the main problem is that mmap doesn't let us control when changes to
the memory buffer will get reflected back to disk --- AFAICT, the OS is
free to do the write-back at any instant after you dirty the page, and
that completely breaks the WAL algorithm.  (WAL = write AHEAD log;
the log entry describing a change must hit disk before the data page
change itself does.)
        regards, tom lane




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tycho Fruru
Дата:
Сообщение: Re: Democracy and organisation : let's make a revolution
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Buffer Management