Re: Allow pooled connections to list all prepared queries

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Allow pooled connections to list all prepared queries
Дата
Msg-id Pine.BSO.4.56.0412271253540.992@leary.csoft.net
обсуждение исходный текст
Ответ на Allow pooled connections to list all prepared queries  (David Brown <dave@spoonguard.org>)
Ответы Re: Allow pooled connections to list all prepared queries  (David Brown <dave@spoonguard.org>)
Список pgsql-patches

On Sat, 25 Dec 2004, David Brown wrote:

> You're right, in the case of standalone Perl or Apache::DBI. However, if
> DBD::Pg happens to grab an already-open connection that doesn't have a
> one-to-one correspondence with a $dbh (e.g. from a Postgres connection pool,
> or from an external pooling server like DBBalancer[1]), the state of the
> connection (with respect to past PREPAREs) isn't known.
>

I'm not clear why the pooling case is different.  Speaking from the JDBC
side (which does connection pooling, but not statement pooling) there is
a proxy connection object which wraps a real connection.  So each new
connection from the pool gets a new proxy object, but the real underlying
connection stays the same.  So the real connection will know what it has
or has not prepared.  So I don't see why, simply because it's in a pool,
that it forgets what's been prepared.

Kris Jurka

В списке pgsql-patches по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Fix oldstyle_length regression test for netbsd-mac68k
Следующее
От: Mark Kirkwood
Дата:
Сообщение: Another Plpgsql trigger example - summary table