From: | Jim Nasby <decibel(at)decibel(dot)org> |
---|---|
To: | Sefer Tov <sefer(at)hotmail(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Question about PG cache selection strategy |
Date: | 2006-11-27 01:55:55 |
Message-ID: | CDC90D05-0ED0-42CD-9E75-38AC04897640@decibel.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Nov 23, 2006, at 8:37 AM, Sefer Tov wrote:
> oddities. Clearly the caching algorithm favors caching the indices
> to data (since they are more frequently accessed) but there is
> another case where *recently written* entries are often requested
> shortly after and I am not sure that they get prioritized correctly
> by the cache. My question is whether the cache algorithm caches
> only READ pages or also WRITTEN pages?
> If it does, is there to set some prioritization ratio for these per
> table? It would enable to tune the caching for everyone specific
> needs (if needed).
Any writes to a page happen via shared_buffers, so yes, writes are
cached. Once a page is dirtied, it will stay that way until it's
written out by the background writer, or a checkpoint writes it out.
I believe that the buffer management algorithms can decide that page
should be removed from the buffer, which would also write it out.
--
Jim Nasby jim(at)nasby(dot)net
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell)
From | Date | Subject | |
---|---|---|---|
Next Message | Guy Rouillier | 2006-11-27 04:14:17 | Re: Development of cross-platform GUI for Open Source DBs |
Previous Message | Tom Lane | 2006-11-27 01:45:48 | Re: Slow left outer join |