Search Postgresql Archives

Re: Postgres as In-Memory Database?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 19, 2013 at 7:41 PM, Edson Richter <edsonrichter@xxxxxxxxxxx> 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux