0

I have my application working on psql ODBC driver, connecting my .net code to the postgreSQL server and the connection string is as follows:

<add name="abc" connectionString="DSN=DriverName;UID=U_name;Pwd=Paas;POOLING=true;MIN POOL SIZE=1;MAX POOL SIZE=25;" providerName="SYSTEM.DATA.ODBC" />

I have set my connection timeout = 120; (in seconds)

I want to maintain the execution process to be upto 25 and not exceeding it. Hence I used connection pooling. But it is not working. The connection limit is exceeding the MAX POOL SIZE.

Please help me out on this one. What can I do to get the connection limit to 25 only and not exceeding it.

I am using :

1) .Net 4.0 Version.

2) psqlODBC driver is 9.5.3(64-bit).

3) pg-Admin is 9.5.

  • If you're using .NET, stop using the ODBC driver and just use the ngpsql library on nuget. – Phill Jul 01 '16 at 16:13
  • Also pooling is managed by the client, not postgresql. – Phill Jul 01 '16 at 16:22
  • but the psqlODBC is the driver provided by postgreSQL itself, Npgsql lacks in performance since its bit time consuming. – Akshaya Pange Jul 02 '16 at 18:13
  • You wouldn't be able to notice any perf difference between the two. So you can either go the accepted .net route, or go a path no one goes down in .net – Phill Jul 03 '16 at 06:13
  • @Phill: Isn't Connection Pooling managed entirely in the ODBC Driver Manager? IMHO the driver itself doesnt need to know anything about pooled connections... (?) – erg Jul 04 '16 at 10:16
  • You're right @erg. I just found out that connection pooling is managed by ODBC driver manager and not the driver itself. But I don't know how to configure the ODBC driver manager. – Akshaya Pange Jul 04 '16 at 12:57

0 Answers0