pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Pierre-Frédéric Caillaud <lists@boutiquenumerique.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: memcached and PostgreSQL
Date: Mon, 22 Nov 2004 21:18:05 -0500 (EST)
Message-ID: <200411230218.iAN2I5o22567@candle.pha.pa.us> (raw)
In-Reply-To: <opshu80ejvcq72hf@musicbox>

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



view thread (17+ messages)  latest in thread

Message-ID: <200411230218.iAN2I5o22567@candle.pha.pa.us>
Permalink:  ../200411230218.iAN2I5o22567@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200411230218.iAN2I5o22567@candle.pha.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: pgman@candle.pha.pa.us, lists@boutiquenumerique.com
  Subject: Re: memcached and PostgreSQL
  In-Reply-To: <200411230218.iAN2I5o22567@candle.pha.pa.us>
  References: <opshu80ejvcq72hf@musicbox> <200411230218.iAN2I5o22567@candle.pha.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox