From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Edson Richter <edsonrichter(at)hotmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Postgres as In-Memory Database? |
Date: | 2013-11-20 16:36:49 |
Message-ID: | CAMkU=1x0DVS0snAG-hRxNK_LN6+9cj26gtV2drj8rApxSnKCFg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Nov 19, 2013 at 7:41 PM, Edson Richter <edsonrichter(at)hotmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stefan Keller | 2013-11-20 17:02:50 | Re: Postgres as In-Memory Database? |
Previous Message | Tom Lane | 2013-11-20 15:13:18 | Re: Debugging extension with gdb? |