Hi,
Recently, I was trying to take advantage of a logging option in Postgres in which the name of the connecting application is logged along with, well… the logged statements. Looking at the Postgres documentation, it seems this feature is new as of 9.x, and in order to take advantage, the calling application has to identify itself - either through an explicit SET command, or via a connection parameter.
However, when I tried to do this, I didn’t get any expected results. My logs still showed “unknown” for the application name, instead of what I set it to in Geoserver’s datastore config.
Looking into it further, I noticed that the current version of Geoserver is using an older version of the Postgres JDBC driver (the file in the webapp is named “postgresql-8.4-701.jdbc3.jar”). Curious, I downloaded the latest version (“postgresql-9.2-1002.jdbc4.jar”) and manually installed it in Geoserver’s “lib” folder and restarted. Voila! My application name is now getting set when Geoserver makes a connection.
My question is: is there a reason why this older driver is still being distributed with the latest stable Geoserver releases? Additionally, are there any known incompatibilities that I should be aware of before I go ahead and try using this newer driver?
Thanks,
Doug
On Fri, Nov 30, 2012 at 1:56 AM, Douglas Rapp <dougman82@anonymised.com> wrote:
My question is: is there a reason why this older driver is still being distributed with the latest stable Geoserver releases? Additionally, are there any known incompatibilities that I should be aware of before I go ahead and try using this newer driver?
A few:
- the newer drivers were consistently slower than the one we ship in benchmarks (a few years ago, haven’t checked lately)
- GeoServer needs also to work with older versions of PostgreSQL, not clear what the newer drivers support
I believe the driver version was made configurable on geotools trunk, but I believe the default version
remained the same, have a look at the geotools-devel mailing list archives, there is some discussion there
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
The biggest change in the newer drivers is to handle the postgresql client/server protocol changes that occurred in postgresql 9. As far as i can tell this really only affects your data if you store blob columns as the default encoding has changed.
···
On Fri, Nov 30, 2012 at 2:51 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:
On Fri, Nov 30, 2012 at 1:56 AM, Douglas Rapp <dougman82@anonymised.com> wrote:
My question is: is there a reason why this older driver is still being distributed with the latest stable Geoserver releases? Additionally, are there any known incompatibilities that I should be aware of before I go ahead and try using this newer driver?
A few:
- the newer drivers were consistently slower than the one we ship in benchmarks (a few years ago, haven’t checked lately)
- GeoServer needs also to work with older versions of PostgreSQL, not clear what the newer drivers support
I believe the driver version was made configurable on geotools trunk, but I believe the default version
remained the same, have a look at the geotools-devel mailing list archives, there is some discussion there
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
Keep yourself connected to Go Parallel:
TUNE You got it built. Now make it sing. Tune shows you how.
http://goparallel.sourceforge.net
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.