Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I've activated shmem memory caching in pgpool and I'm getting a strange problem.

I have an insert query like:

INSERT INTO gps_comments (gcunit,gccomment,gcst,gcwho,gcexception,
values (" . $_REQUEST['unit'] . ",
upper('" . pg_escape_string($_REQUEST['comment']) . "'),now(),
" . $_SESSION['aliasid'] . "," . $exc . ",'" . $_REQUEST['container'] . "'," . 
$_REQUEST['customer'] . ",
'" . $_REQUEST['location'] . "')

The problem is that the value of $_REQUEST['location'] is being cached too and if this is changed the previous value will be inserted in the database which is wrong!

If I disable shmem in pgpool the everything works fine.

How can I overcome this?

Should I use a prepared statement?


share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.