Re: confused about transactions and connection pools

Поиск
Список
Период
Сортировка
От David Goodenough
Тема Re: confused about transactions and connection pools
Дата
Msg-id 200610301922.55897.david.goodenough@btconnect.com
обсуждение исходный текст
Ответ на Re: confused about transactions and connection pools  (Kris Jurka <books@ejurka.com>)
Ответы Re: confused about transactions and connection pools
Список pgsql-jdbc
On Monday 30 October 2006 18:40, Kris Jurka wrote:
> On Mon, 30 Oct 2006, David Goodenough wrote:
> > The we get to the second time through the servlet.  First thing - no
> > BEGIN or ROLLBACK, but the code went through a call to
> > connection.setAutoCommit( false).  Secondly this odd statement that I do
> > not recognise id no longer there.
>
> For each connection the statements BEGIN, ROLLBACK, and COMMIT are only
> prepared once and after that they are executed again and again.  This can
> be very confusing when looking at the logs which only show the preparation
> step, but not execution.  So even though you can't see them, they're being
> executed.  The 8.2 release will be the first release that can accurately
> log this usage pattern.
>
> Kris Jurka
is it only the BEGIN, ROLLBACK and COMMIT that are only shown when being
prepared?  I ask because all the statement are PreparedStatements and they
get prepared each time we get a new connection, which I understand means
that they prepared for real first time they are used, but are then cached
and therefore that one should always use substitutable ? paramaters so that
the statement is always the same.  If only the prepares are being logged
then the pool is obviously not working as the insert into the logs table
get logged each time through.

I am now more confused.

David

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Postgres XA support
Следующее
От: Marc Herbert
Дата:
Сообщение: Re: altered records