Question about PG cache selection strategy

From: Sefer Tov <sefer(at)hotmail(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Question about PG cache selection strategy
Date: 2006-11-23 14:37:58
Message-ID: BAY118-W213BC5B5C36E185ABB796BA8E20@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm running a very large and frequently updated database on a machine with relatively limited memory (you can safely assume that the database disk usage to available memory has a ratio of 10:1 - so clearly not all the pages can be retained in memory).

The naive approach would presume that 9 out of 10 requests would hit the disk, in reality that is not true and yet I have observed some 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).

Thanks
Sefer.
_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial!
http://www.windowsonecare.com/purchase/trial.aspx?sc_cid=wl_wlmail

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jorge Godoy 2006-11-23 14:40:33 Re: IS it a good practice to use SERIAL as Primary Key?
Previous Message Alexander Staubo 2006-11-23 13:21:25 Stuck in "DELETE waiting"