Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 7770B1337BBB for ; Thu, 31 Mar 2011 04:29:31 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 29204-05 for ; Thu, 31 Mar 2011 07:29:13 +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 4F4CB1337999 for ; Thu, 31 Mar 2011 04:29:11 -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 p2V7TAjn067192 for ; Thu, 31 Mar 2011 10:29:10 +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 p2V7TA0x067191 for pgsql-jdbc@postgresql.org; Thu, 31 Mar 2011 10:29:10 +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 09:29:10 +0200 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201103311029.10460.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/143 X-Sequence-Number: 21698 Hello, what i think that it would be nice to have is being able to couple users in= the app server with postgresql users.=20 Currently most people define an app server (usually super) user to access t= he database, and the connections in the pool are created with this db user connecting to= the db. Numerous times I encountered situations where I would like to link entries from the web/app server access log (where app server usernames are logged) with entries from the postgresql log, where only the app server db user is = logged. In order to to this corelation, or even worse to *prove* that app server us= er (lets call him Uapp) caused or did not cause this erroneous/malicious DB statement, one has to g= rep for SQL stmts through the source, then idntify some apps as candidated for having been ru= n, and then try to find from the web/app server access logs who those people a= re. This does not work nice and is not accurate. What would be ideal is to have the app/web server users get connections fro= m the pool=20 authenticated against their app server users. There are ways to do that, I have implemented this in our installation in a= test system. However, the problem is that the pool is per user, the connections are name= d and each pool can have e.g. max connections. This does not scale well, since it requires=20 max_connections >=3D MAX_CONNECTIONS_PER_USER_DEFINED_IN_APP_SERVER * MAX_A= PP_SERVER_CONCURRENT_USERS =46rom what i played a little bit with SET SESSION AUTHORIZATION, SET ROLE, those did not seem to affect the actual user (%u) in logging in postgresql = logs. The aim was to have one common pool with "unnamed" connections and assign t= hem to a user after/on geting the connection. If that was possible, and if JDBC supported that, then this problem would b= e easily solved. I know pgsql JDBC driver is the last part of the puzzle, but i just thought= to mention it here since the context seems right. =CE=A3=CF=84=CE=B9=CF=82 Friday 25 March 2011 02:35:48 =CE=BF/=CE=B7 Dave C= ramer =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > Just got back from pgeast. Seems everyone seems to have a gripe about > the JDBC driver. >=20 > My sense is that for basic read/write/update/delete the driver works > just fine. However I'd like to compile a list of everyone's gripe. >=20 > Dave >=20 =2D-=20 Achilleas Mantzios