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, gccontainer,gccustomer,gclocation) 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?