Re: seq scan cache vs. index cache smackdown

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: seq scan cache vs. index cache smackdown
Дата
Msg-id 87k6p93bwt.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: seq scan cache vs. index cache smackdown  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-performance
Josh Berkus <josh@agliodbs.com> writes:

> Why is mmap not workable?    It would require far-reaching changes to our code
> -- certainly -- but I don't think it can be eliminated from consideration.

Fundamentally because there is no facility for being notified by the OS before
a page is written to disk. And there's no way to prevent a page from being
written to disk (mlock just prevents it from being flushed from memory, not
from being synced to disk).

So there's no way to guarantee the WAL will be written before the buffer is
synced to disk.



Maybe it could be done by writing and syncing the WAL independently before the
shared buffer is written to at all, but that would be a completely different
model. And it would locking the shared buffer until the sync is done, and
require a private copy of the shared buffer necessitating more copies than the
double buffering in the first place.

--
greg

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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: seq scan cache vs. index cache smackdown
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: Re: seq scan cache vs. index cache smackdown