pgmemcache with Postgres 7.4.x

Sean Chittenden sean at
Tue Aug 23 00:29:11 PDT 2005

> I'd love to use pgmemcache, but I'm having problems.  I wonder if
> anyone here can help.
> First off, for now I'm stuck with Postgres 7.4.x (for some reason
> 8.0.3 builds, but fails its own regression tests, on our production
> box).  So I'm working with 7.4.8-2 (Debian package).  However the
> pgmemcache makefile is designed to work with postgres 8.x; under
> 7.4.x, it fails because there is no "pg_config --pgxs".
> I did find a way of getting it to compile by hand (cc
> -L../libmemcache-Dpg_strncasecmp=strncasecmp -Dpg_tm=tm -fpic
> -shared -o -I /usr/include/postgresql/server -I
> ../libmemcache -lmemcache pgmemcache.c) - builds, and
> I can load it in (CREATE FUNCTION) and for a while this all worked
> just fine.  Then Debian upgraded Postgres, so I rebuilt pgmemcache,
> and now it's rather unstable - sometimes it works, and other times
> (repeatably) I get segfaults in the postgres server. :-(
> It's all a bit frustrating.  Any help would be appreciated!

Here's what I would do:

0) Uninstall the old version of memcache(3)
1) Install memcache(3) 1.4.0b4.
2) Recompile pgmemcache with the new 1.4 code
3) Restart PostgreSQL

That should clear things up given the changes that have been made
inside of memcache(3).  The problem regarding the upgrade to Debian
has more to do with potentially memcache(3) changing than it does with
it being a PostgreSQL problem, but, it couldn't hurt to recompile
everything with the most recent version (which has a substantial
number of fixes/changes compared to the version you're probably
running).  -sc

Sean Chittenden

More information about the memcached mailing list