Re: How to avoid SET application_name = '' - Mailing list pgsql-jdbc

From Sehrope Sarkuni
Subject Re: How to avoid SET application_name = ''
Date
Msg-id CAH7T-aoGF8MGNim2SUg6tDM7HMeKZgMnVeh5WzhJJOx0C4mEAQ@mail.gmail.com
Whole thread Raw
In response to Re: How to avoid SET application_name = ''  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-jdbc
On Thu, Dec 3, 2015 at 10:44 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
On 27 November 2015 at 00:35, Fabio Caiut <caiut@hotmail.com> wrote:
Hi, 
Vladimir, Thomas ... you're right.

The glassfish guys analyzed dumps and look in the glassfish sources, the problem is there. 
They told me pool calls setClientInfo for each query!! 


If an application_name is passed on the JDBC URL, PgJDBC should really send it in the startup packet, not a follow-up SET anyway. I haven't checked to see if it currently does.

Yes if the connection property "assumeMinServerVersion" is set to at least 9.0 then the application_name will be set in the start up packet (rather than as a separate query after the connection is established). There's no default value though as older server versions will not support it.

Regards,
-- Sehrope Sarkuni

pgsql-jdbc by date:

Previous
From: "Markus KARG"
Date:
Subject: Re: Migration to Maven
Next
From: Georg Brünsing
Date:
Subject: jdbc high memory consumption for RAISE NOTICE output using function-call in Java