Re: Postgres as In-Memory Database?

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Postgres as In-Memory Database?
Дата
Msg-id CAMkU=1x0DVS0snAG-hRxNK_LN6+9cj26gtV2drj8rApxSnKCFg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Postgres as In-Memory Database?  (Edson Richter <edsonrichter@hotmail.com>)
Список pgsql-general
On Tue, Nov 19, 2013 at 7:41 PM, Edson Richter <edsonrichter@hotmail.com> wrote:

Ok, I still have one doubt (I'm learning a lot, tkx!):

What happens, then, if data has been commited (so it is in xlog), but it is not in data pages yet, and it doesn't fit in memory buffers anymore: how would PostgreSQL query data without having to wait for checkpoint happend and data be available in data pages?

PostgreSQL never just drops a dirty page from the buffers, unless the object it is part of was dropped (or the system crashes, in which case it has to go through recovery).  Rather it would first evict the dirty page by writing it to the kernel (which in turn will write it to disk, eventually), at which point it is the kernel's responsibility to send the correct data back upon request when it is later needed again--either by fetching it from its own cache if it is still there or by reading it from disk.

Cheers,

Jeff

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Debugging extension with gdb?
Следующее
От: Stefan Keller
Дата:
Сообщение: Re: Postgres as In-Memory Database?