Re: memcached and PostgreSQL

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Pierre-Frédéric Caillaud <lists(at)boutiquenumerique(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: memcached and PostgreSQL
Date: 2004-11-23 02:18:05
Message-ID: 200411230218.iAN2I5o22567@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Pierre-Frdric 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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2004-11-23 02:26:05 Re: scalability issues on win32
Previous Message Rod Taylor 2004-11-23 01:03:11 Re: Data type to use for primary key