Re: memcached and PostgreSQL

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

 



Pierre-Frédéric Caillaud wrote:
> 
> > While an exception, this is a very real possibility in day to day  
> > operations. The absence of any feedback or balancing mechanism between  
> > the database and cache makes it impossible to know that they are in sync  
> > and even a small error percentage multiplied over time will lead to an  
> > ever increasing likelihood of error.
> 
> 	Sure, but there are applications where it does not matter, and these  
> applications are othen loading the database... think about displaying  
> forum posts, products list in a web store, and especially category trees,  
> top N queries... for all these, it does not matter if the data is a bit  
> stale. For instance, a very popular forum will be cached, which is very  
> important. In this case I think it is acceptable if a new post does not  
> appear instantly.

My point was that there are two failure cases --- one where the cache is
slightly out of date compared to the db server --- these are cases where
the cache update is slightly before/after the commit.  The second is
where the cache update happens and the commit later fails, or the commit
happens and the cache update never happens.  In these cases the cache is
out of date for the amount of time you cache the data and not expire it.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@xxxxxxxxxxxxxxxx               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux