this is more of a discussion post than a response: On Aug 5, 2006, at 10:02 AM, Mark Stosberg wrote:do you have links of that in regards to dbd::pg? i didn't realize they supported it.
However, when deploying it on mod_perl on a busy website, I quickly saw a lot of this kind of error:prepared statement "dbdpg_7" already exists
from my experience with psycopg ( python pg interface ) it is the persistant connection issue. obviously , you're trying to prepare a statement that has already been allocated. but i'm wondering how/why that's happening.
I found a related mention of this issue here: http://fudforum.org/forum/index.php?t=msg&th=4598&start=0& There the fix involved putting using DEALLOCATE when persistent
first, the patch with DEALLOCATE makes prepared statements entirely useless, as it means you're caching a prepared statement, running it, then deallocating it immediately afterwards. thats some brilliant php right there. why didn't they just do a conditional to never prepare on persistant connections ?
before looking into how dbd::pg is internally handling the prepared statements, are you using some sort of db abstraction layer like rose or class::dbi. or are you executing directly? if executing directly, are you creating statement handles on the outset, or are you just letting dbdpg handle all of that internally?
the prepared statement 'handle/name' is private to the session. so two different connections will each have their own statement handle.
my guess on things to look into: how is dpd::pg caching the statement handle? are they even doing it?where is the statment handle being cached, accessed, checked? in the memory space of the child, or in the shared area?
// Jonathan Vanasco| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder | Web Identity Management and 3D Social Networking| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans | Collaborative Online Management And Syndication Tools| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.