GeoServer 2.6.0 + Tomcat + Tomcat pool + JNDI leaves PostgreSQL transactions open

Description

I just upgraded from version 2.5.2 to 2.6.0 and encountered, that GeoServer 2.6.0 now leaves pending/open transactions in the PostGIS/PostgreSQL database between service requests.

I'm using a JNDI PostGIS data source (configured in Apache Tomcat) and did not test whether this happens with non-JNDI data sources too (however, I'm sure it has nothing to do with JNDI or non-JNDI sources).

GeoServer/GeoTools seems to start transaction even if it's only reading data (that is, not performing a WFS-T operation, but processing a WMS request). Maybe you start the transaction "manually" or it's the SET extra_float_digits = 3 statement, that implicitly starts a transaction.

However, before the connection is given back to the pool (aka closed), there is no longer a ROLLBACK statement issued. After that, a pending transaction is left back, making it impossible to do any maintenance tasks (ANALYZE, VACUUM for example) on the corresponding table. pgAdmin III Server Status reports for Status: idle in transaction

Actually, GeoServer 2.5.2 issued a ROLLBACK statement as it's last operation on the connection before returning it to the pool. That seems to be missing with the new version.

Maybe a ROLLBACK statement in the Session close-up SQL could help as a workaround (it actually does for read-only requests like WMS requests), but I do not know what problems arise with WFS-T transactions like insert, update or delete.

Environment

None

Status

Assignee

Unassigned

Reporter

codehaus

Triage

Fix versions

None

Affects versions

None

Components

Priority

Medium
Configure