| From: | Barry Lind <blind(at)xythos(dot)com> |
|---|---|
| To: | Gaetano Mendola <mendola(at)bigfoot(dot)com> |
| Cc: | pgsql-jdbc(at)postgresql(dot)org, David Wall <d(dot)wall(at)computer(dot)org> |
| Subject: | Re: Connection Idle in transaction |
| Date: | 2004-04-09 15:37:01 |
| Message-ID: | 4076C31D.20503@xythos.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Gaetano Mendola wrote:
> Gaetano Mendola wrote:
>> Yes a "idle in transaction" connection for example block each vacuum
>> full, just not to mention all the rows kidnapped by that transaction.
>
>
> Not block sorry, but the vacuum is not able to free all the row updated
> by other connections.
>
I agree that your suggested change in behavior is good (please feel free
to submit a patch), it isn't necessarily going to solve your problem.
> try to connect to your DB, do a "begin" and leave that transaction
> sitting there for days...
The problem here is that your application would allow a connection to
the database to sit around for days. Even with your suggested changes
to the driver, if a jdbc connection did a select (which would start a
transaction) and then left that connection sit arround for days you
would still have the same problem. Your suggested change to the driver
just delays the point where a connection starts, but if you allow long
lived connections to the database I contend that you will still see your
problem since some code somewhere will simply issue a select and then
hold an open idle connection for long periods of time.
--Barry
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dave Cramer | 2004-04-09 15:55:18 | Re: cannot connect to db from remote machine |
| Previous Message | James Robinson | 2004-04-09 14:51:52 | Under what circumstances does PreparedStatement use stored plans? |