Re: [JDBC] Could pgsql jdbc support pool reauthentication?

Поиск
Список
Период
Сортировка
От Achilleas Mantzios
Тема Re: [JDBC] Could pgsql jdbc support pool reauthentication?
Дата
Msg-id 09a677fd-144f-6b16-57a8-ed6a18f3ff08@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на Re: [JDBC] Could pgsql jdbc support pool reauthentication?  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Ответы Re: [JDBC] Could pgsql jdbc support pool reauthentication?  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Re: [JDBC] Could pgsql jdbc support pool reauthentication?  (Álvaro Hernández Tortosa <aht@8kdata.com>)
Список pgsql-jdbc
Hello Vladimir, thanx

On 31/10/2017 10:30, Vladimir Sitnikov wrote:
> Achilleas>So if say we need 5 connections max for the most complex app to work, and we have 200 users, then at peak
time,the total number of connections would have to be raised to 1000.
 
>
> Pools can shrink, so you do not have to raise total number of connections to 1000 unless you truly expect 1000
concurrentconnections.
 
I know, but we still risk having our max_connections exceeded. And this is not scaleable.
>
> That is, you could configure 200 pools with minCapacity=0, maxCapacity=5.
> Of course you would need thread-pool limits as well to avoid sending more than 5 concurrent requests on behalf of a
givenuser id.
 
>
That's what he have done.
> Technically speaking, there's JDBC standard way of calling "set_user" via
java.sql.Connection#setClientInfo("ClientUser",java.lang.String), however I'm not sure how well it is supported/used.
 
>
>
> PS Are you aware of ApplicationName? That is java.sql.Connection#setClientInfo("ApplicationName", java.lang.String)
Yes, we make heavy use of ApplicationName in each of our apps/tenants. Pretty handy with logging, pgbadger etc.
>
> Vladimir


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: [JDBC] Could pgsql jdbc support pool reauthentication?
Следующее
От: Vladimir Sitnikov
Дата:
Сообщение: Re: [JDBC] Could pgsql jdbc support pool reauthentication?