Re: memcached and PostgreSQL - Mailing list pgsql-performance

From Bruce Momjian
Subject Re: memcached and PostgreSQL
Date
Msg-id 200411230218.iAN2I5o22567@candle.pha.pa.us
Whole thread Raw
In response to Re: memcached and PostgreSQL  (Pierre-Frédéric Caillaud<lists@boutiquenumerique.com>)
Responses Re: memcached and PostgreSQL  (Sean Chittenden <sean@chittenden.org>)
List pgsql-performance
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@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-performance by date:

Previous
From: Rod Taylor
Date:
Subject: Re: Data type to use for primary key
Next
From: Bruce Momjian
Date:
Subject: Re: [pgsql-hackers-win32] scalability issues on win32