Re: question about using pgmemcache

Поиск
Список
Период
Сортировка
От Chris
Тема Re: question about using pgmemcache
Дата
Msg-id 4AF79593.2090305@gmail.com
обсуждение исходный текст
Ответ на question about using pgmemcache  (Juan Backson <juanbackson@gmail.com>)
Список pgsql-general
Juan Backson wrote:
> Hi,
>
> I am planning to pgmemcache to act as a fast-accessible cache before my
> app and postgres.
>
> I have got it pgmemcache setup.  The question I have is that if
> memcached crashes, and I need to restart memcached, since memcached is
> not persistent, do I need to run some scripts to auto-recreate all the
> key value data from postgres?

It depends on how your app is using it. If it absolutely requires the
data to be in memcache, then yes. If it supports falling back to the db
if it doesn't find it in memcache (and then adding it to memcache), then
no - your app will re-populate memcache as it needs to.

> What is the easiest way to do it?  Is there anyway that I can write some
> syncup function to let postgres to do the re-creation of data to memcached.

You'll need to write your own script(s) to do this - memcache has no
idea what you want to cache (so there's no "auto sync" type script).

--
Postgresql & php tutorials
http://www.designmagick.com/


В списке pgsql-general по дате отправления:

Предыдущее
От: Juan Backson
Дата:
Сообщение: question about using pgmemcache
Следующее
От: Tim Uckun
Дата:
Сообщение: Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.