Re: debugging: prepared statement "dbdpg_7" already exists
Mark Stosberg <mark-WmyhgDpj2fCHT8/[email protected]>
| Newsgroups | gmane.comp.db.postgresql.dbdpg |
|---|---|
| Message-ID | <[email protected]> |
On 2006-05-04, David Wheeler <[email protected]> wrote: > On May 4, 2006, at 08:56, Mark Stosberg wrote: > >> prepared statement "dbdpg_7" already exists >> >> Could this be because there DBD::Pg is on two different machines, >> talking to the same database, and each has different concept of >> what should be stored in 'dbdpg_7' ? > > They *should* be connection-based. Thanks for the prompt response. I did a test with concurrent psql sessions preparing a statement with the same name. I confirmed that this worked, and the statements went away on disconnect. So what else could this be? The site is high traffic, so maybe there is a race condition when selecting the next handle name to use? Apache::DBI issue? Perhaps I'm just illustrating that I have no idea what's going on. :) Maybe there could some recovery code which would check for this kind of error and try a new name if there's a collision. (With some maximum number of retries). Mark