pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Achilleas Mantzios <achill@matrix.gatewaynet.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: JDBC gripe list
Date: Thu, 31 Mar 2011 12:21:51 +0200
Message-ID: <201103311321.51440.achill@matrix.gatewaynet.com> (raw)
In-Reply-To: <in1jm9$sqa$1@dough.gmane.org>
References: <AANLkTik0kW5_jCAc7h0T_Q5cCGx=tunasHJ=nf0X=+ij@mail.gmail.com>
	<201103311058.57025.achill@matrix.gatewaynet.com>
	<in1jm9$sqa$1@dough.gmane.org>

Στις Thursday 31 March 2011 13:06:04 ο/η Thomas Kellerer έγραψε:
> Achilleas Mantzios, 31.03.2011 09:58:
> >> If you are on 9.0 and have control over the connection
> >> initialization in the pool, then using 9.0's "application_name"
> >> might be a solution to this.
> >>
> >> If you can configure the pool to run
> >>
> >> SET application_name = 'app_user_name'
> >>
> >> when a connection is taken out of the pool, then this name can be
> >> part of the log message in the PostgreSQL logfile.
> >>
> >
> > Yes, sure, thanx for sharing this. One could indeed do this by
> > hacking/subclassing the relevant pool classes in the app server. But
> > that would still be a work around. I dont know why SET application
> > ='' is reflected in the log files, but SET ROLE is not. Is it
> > intentional ? Anyways this question should be targeted to the backend
> > guys rather than here.
> 
> The actual SET application_name is not logged directly, but you can change the log configuration to include the name that is set with that statement.
> 

You mean log_line_prefix parameter. Ok but a 
log_line_prefix = '%d %a %u %p %c %m '
while it prints correctly %a (application) (as set by SET application_name), 
it does not print correctly %u (user) (as set by SET ROLE).

> Regards
> Thomas
> 
>   
> 
> 



-- 
Achilleas Mantzios



view thread (65+ messages)  latest in thread

Message-ID: <201103311321.51440.achill@matrix.gatewaynet.com>
Permalink:  ../201103311321.51440.achill@matrix.gatewaynet.com/
Also on:    postgresql.org/message-id/201103311321.51440.achill@matrix.gatewaynet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: achill@matrix.gatewaynet.com
  Subject: Re: JDBC gripe list
  In-Reply-To: <201103311321.51440.achill@matrix.gatewaynet.com>
  References: <AANLkTik0kW5_jCAc7h0T_Q5cCGx=tunasHJ=nf0X=+ij@mail.gmail.com> <201103311058.57025.achill@matrix.gatewaynet.com> <in1jm9$sqa$1@dough.gmane.org> <201103311321.51440.achill@matrix.gatewaynet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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