Re: debugging: prepared statement "dbdpg_7" already exists

"Greg Sabino Mullane" <greg-738XdyZ4GzZWk0Htik3J/[email protected]>
Newsgroups gmane.comp.db.postgresql.dbdpg
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> Prepared statements break immediately using pgpool.
> ...
> While I think the ideal of not bothering people with it is admirable,
> I would love to see the ability to easily set the name during a
> regular prepare, because I would like to be able to take advantage of
> pgpool, and I would rather not have to do a double prepare for every
> single statement.

It is a tricky problem. Ideally, sessions disconnecting would deallocate
the statements themselves. The use of pgpool with anything that changes
the database session seems unadvisable, but I haven't found a clean way
(outside of creating temp tables) to pass information from one DBI instance
to another when using pgpool. However, there are three things that should
help or solve this problem:

* I've changed the name of the prepared statement to include the process id.
So, if a new process comes in, it won't attempt to use pre-existing names.

* I'll add in the ability to specify the prepared statement name with prepare.

* Most importantly, the latest news from pgpool might also fix the problem.
See the last sentence of the release announcement:
  
| pgpool Global Development Group has just released pgpool 3.0.2.  In
| pgpool 3.0.2, with two new developers, namely Yoshiyuki Asaba and
| Taiki Yamaguchi have joined, we have fixed numerous bugs especially in
| the extended query mode. We recommend everyone, particularly newer
| version of JDBC driver users, to upgrade to 3.0.2 as soon as possible
| since the extended query mode is heavily used in it.  Also we
| implemented the functionality to automazically DEALLOCATE prepared
| objects while disconnecting. Users now do not need to worry about
| explicitly issuing DEALLOCATE for remaining prepared objects.

If I get some time, I hope to test out pgpool myself and get all of this
cleared up before the 1.50 release.

- --
Greg Sabino Mullane greg-738XdyZ4GzZWk0Htik3J/[email protected]
PGP Key: 0x14964AC8 200605170814
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFEaxSFvJuQZxSWSsgRAihTAKDQcNwM0NKKIG5bG/zYmgWSTIHP5wCguirb
oHOEOSUCdiKiPVUErAq8KCs=
=uZdA
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.