Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 65EAB1337BD0 for ; Thu, 31 Mar 2011 07:22:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 56542-05 for ; Thu, 31 Mar 2011 10:21:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mail.postgresql.org (Postfix) with ESMTP id ACF211337999 for ; Thu, 31 Mar 2011 07:21:52 -0300 (ADT) Received: from smadev.internal.net (localhost.internal.net [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id p2VALp3t069152 for ; Thu, 31 Mar 2011 13:21:51 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id p2VALppI069151 for pgsql-jdbc@postgresql.org; Thu, 31 Mar 2011 13:21:51 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: pgsql-jdbc@postgresql.org Subject: Re: JDBC gripe list Date: Thu, 31 Mar 2011 12:21:51 +0200 User-Agent: KMail/1.9.7 References: <201103311058.57025.achill@matrix.gatewaynet.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201103311321.51440.achill@matrix.gatewaynet.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.451 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_BRBL_LASTEXT=1.449 X-Spam-Level: X-Archive-Number: 201103/148 X-Sequence-Number: 21703 =CE=A3=CF=84=CE=B9=CF=82 Thursday 31 March 2011 13:06:04 =CE=BF/=CE=B7 Thom= as Kellerer =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > 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 =3D '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 > > =3D'' 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. >=20 > The actual SET application_name is not logged directly, but you can chang= e the log configuration to include the name that is set with that statement. >=20 You mean log_line_prefix parameter. Ok but a=20 log_line_prefix =3D '%d %a %u %p %c %m ' while it prints correctly %a (application) (as set by SET application_name)= ,=20 it does not print correctly %u (user) (as set by SET ROLE). > Regards > Thomas >=20 > =20 >=20 >=20 =2D-=20 Achilleas Mantzios