Possible Duplicate:
Django cache.set() causing duplicate key error
I ran into this problem using django core's database cache:
ERROR: duplicate key value violates unique constraint "cache_pkey"
STATEMENT: INSERT INTO "cache" (cache_key, value, expires) VALUES (E':1:cms-menu_nodes_en-us_1', E'gAJdcQEoY21lbnVzLmJhc2UKTmF2aW
LOG: server process (PID 8453) was terminated by signal 9: Killed
LOG: terminating any other active server processes
LOG: all server processes terminated; reinitializing
FATAL: could not create shared memory segment: Cannot allocate memory
DETAIL: Failed system call was shmget(key=5432001, size=29278208, 03600).
I looked in the table and sure enough, there is an entry for the key ':1:cms-menu_nodes_en-us_1'. I found a similar issue here, but was unable to exactly understand what the issue is.
Anyone have any ideas or suggestions? Sounds like a bug in django core, since if a key exist, it should update the record.
edit: I should have clarified that the DB was PostgreSQL 8.4.7. Thanks lazerscience.
edit @ Jack M: I haven't been able to replicate this error, but believe the code is in django.core.cache.backends.db.DatabaseCache in a method called set() that calls _base_set().