pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15125: Cant set ApplicationName in Java...
3+ messages / 3 participants
[nested] [flat]

* BUG #15125: Cant set ApplicationName in Java...
@ 2018-03-21 20:31  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2018-03-21 20:31 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: ezekii.post@gmail.com

The following bug has been logged on the website:

Bug reference:      15125
Logged by:          Ezequiel Post
Email address:      ezekii.post@gmail.com
PostgreSQL version: 9.6.8
Operating system:   Debian Jessie
Description:        

Hello, I'm trying to set ApplicationName via JDBC driver, but the
application_name never changes.
Code:
@Override
	@Transactional
	public Connection getConnection() throws SQLException {
		Properties props = new Properties();
		props.put("user", "postgres");
		props.put("password", "admin");
		props.put("ApplicationName", "wtha");
		Connection connection =
DriverManager.getConnection("jdbc:postgresql://localhost:5433/TESTE",
props);
		connection.setClientInfo("ApplicationName", "wth");
		return connection;
	}

Tried with ?ApplicationName=any, but don't work too..
Any help would be appreciate, thanks!



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #15125: Cant set ApplicationName in Java...
@ 2018-03-22 16:41  Keith Fiske <keith.fiske@crunchydata.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Keith Fiske @ 2018-03-22 16:41 UTC (permalink / raw)
  To: ezekii.post@gmail.com; pgsql-bugs@lists.postgresql.org

On Wed, Mar 21, 2018 at 4:31 PM, PG Bug reporting form <
noreply@postgresql.org> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      15125
> Logged by:          Ezequiel Post
> Email address:      ezekii.post@gmail.com
> PostgreSQL version: 9.6.8
> Operating system:   Debian Jessie
> Description:
>
> Hello, I'm trying to set ApplicationName via JDBC driver, but the
> application_name never changes.
> Code:
> @Override
>         @Transactional
>         public Connection getConnection() throws SQLException {
>                 Properties props = new Properties();
>                 props.put("user", "postgres");
>                 props.put("password", "admin");
>                 props.put("ApplicationName", "wtha");
>                 Connection connection =
> DriverManager.getConnection("jdbc:postgresql://localhost:5433/TESTE",
> props);
>                 connection.setClientInfo("ApplicationName", "wth");
>                 return connection;
>         }
>
> Tried with ?ApplicationName=any, but don't work too..
> Any help would be appreciate, thanks!
>
>

I can't offer much assistance on the issue itself, but have you tried
emailing the pgsql-jdbc mailing list?

https://www.postgresql.org/list/pgsql-jdbc/
https://www.postgresql.org/list/

-- 
Keith Fiske
Senior Database Engineer
Crunchy Data - http://crunchydata.com

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #15125: Cant set ApplicationName in Java...
@ 2018-03-22 16:53  Ezequiel Post <ezekii.post@gmail.com>
  parent: Keith Fiske <keith.fiske@crunchydata.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Ezequiel Post @ 2018-03-22 16:53 UTC (permalink / raw)
  To: Keith Fiske <keith.fiske@crunchydata.com>; +Cc: pgsql-bugs@lists.postgresql.org

Hello Keith, sorry, it was my mistake. is not the application_name of the
whole postgresql server that changes, just the application_name of the
requested connection. after putting a breakpoint just after
"setClientInfo", i could see running the query " "select pid,
application_name from pg_stat_activity" that the application_name of the
connection was right. Sorry again!

Em qui, 22 de mar de 2018 às 13:41, Keith Fiske <keith.fiske@crunchydata.com>
escreveu:

>
>
> On Wed, Mar 21, 2018 at 4:31 PM, PG Bug reporting form <
> noreply@postgresql.org> wrote:
>
>> The following bug has been logged on the website:
>>
>> Bug reference:      15125
>> Logged by:          Ezequiel Post
>> Email address:      ezekii.post@gmail.com
>> PostgreSQL version: 9.6.8
>> Operating system:   Debian Jessie
>> Description:
>>
>> Hello, I'm trying to set ApplicationName via JDBC driver, but the
>> application_name never changes.
>> Code:
>> @Override
>>         @Transactional
>>         public Connection getConnection() throws SQLException {
>>                 Properties props = new Properties();
>>                 props.put("user", "postgres");
>>                 props.put("password", "admin");
>>                 props.put("ApplicationName", "wtha");
>>                 Connection connection =
>> DriverManager.getConnection("jdbc:postgresql://localhost:5433/TESTE",
>> props);
>>                 connection.setClientInfo("ApplicationName", "wth");
>>                 return connection;
>>         }
>>
>> Tried with ?ApplicationName=any, but don't work too..
>> Any help would be appreciate, thanks!
>>
>>
>
> I can't offer much assistance on the issue itself, but have you tried
> emailing the pgsql-jdbc mailing list?
>
> https://www.postgresql.org/list/pgsql-jdbc/
> https://www.postgresql.org/list/
>
> --
> Keith Fiske
> Senior Database Engineer
> Crunchy Data - http://crunchydata.com
>

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-03-22 16:53 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21 20:31 BUG #15125: Cant set ApplicationName in Java... PG Bug reporting form <noreply@postgresql.org>
2018-03-22 16:41 ` Keith Fiske <keith.fiske@crunchydata.com>
2018-03-22 16:53   ` Ezequiel Post <ezekii.post@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox