Re: How to avoid SET application_name = ''

From: Sehrope Sarkuni <sehrope(at)jackdb(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: Fabio Caiut <caiut(at)hotmail(dot)com>, Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: How to avoid SET application_name = ''
Date: 2015-12-05 23:17:35
Message-ID: CAH7T-aoGF8MGNim2SUg6tDM7HMeKZgMnVeh5WzhJJOx0C4mEAQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, Dec 3, 2015 at 10:44 AM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
>
> On 27 November 2015 at 00:35, Fabio Caiut <caiut(at)hotmail(dot)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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Korry Douglas 2015-12-07 20:26:33 Re: Patch: Implement failover on libpq connect level.
Previous Message Markus KARG 2015-12-03 18:21:39 Re: Migration to Maven