public inbox for [email protected]  
help / color / mirror / Atom feed
Enabling connection pooling by default
2+ messages / 2 participants
[nested] [flat]

* Enabling connection pooling by default
@ 2021-08-20 11:14  Vadim Presniak - Consultant <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Vadim Presniak - Consultant @ 2021-08-20 11:14 UTC (permalink / raw)
  To: pgsql-odbc; +Cc: Andrius Docius <[email protected]>; Zilvinas Susinskas <[email protected]>

Hello,

We had been investigating why our application works dramatically slower with Postgre SQL DB than MS SQL Server and found that the main reason was related to the fact that CPTimeout option is not set for psqlOdbc driver, however this option is set by default to 60 for Microsoft ODBC drivers. We’ve done simple patch with changes for psqlOdbc driver installer to enable this option during driver installation. (0001-CPTimeout-option-set-to-60-for-odbc-driver-by-defaul.patch)  Is it possible to push this change in master branch?

This topic was discussed in 2008 (https://www.postgresql.org/message-id/F613CCFA0B7146A38D24394E8F29C66C%40andrusnotebook), but I could not find final decision for this topic.

Regards,
Vadim Presniak


________________________________



This email, including any attachments, may contain confidential and/or proprietary information intended only for the use of the recipient. If you are not the intended recipient, any distribution, copying, or use of this email or its attachments is prohibited. If you received this email in error, please reply to the sender immediately and delete this message and any copies.

Bentley Systems has taken all reasonable steps to ensure that this communication is free from viruses, data corruption, and unauthorized alteration. Bentley Systems does not accept liability for any damages that may be incurred as a result of this or any communication by email


[https://cdn2.webdamdb.com/310th_sm_UnR3pO7k0ir0.jpg?1616176329]


Attachments:

  [application/octet-stream] 0001-CPTimeout-option-set-to-60-for-odbc-driver-by-defaul.patch (3.4K, 3-0001-CPTimeout-option-set-to-60-for-odbc-driver-by-defaul.patch)
  download | inline diff:
From 0ecca596beafde5c3c1d96697891faed6973c868 Mon Sep 17 00:00:00 2001
From: Vadim <[email protected]>
Date: Mon, 2 Aug 2021 18:56:08 +0300
Subject: [PATCH] CPTimeout option set to 60 for odbc driver by default

---
 installer/psqlodbcm_cpu.wxs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/installer/psqlodbcm_cpu.wxs b/installer/psqlodbcm_cpu.wxs
index bf4f767..1edbf1e 100644
--- a/installer/psqlodbcm_cpu.wxs
+++ b/installer/psqlodbcm_cpu.wxs
@@ -145,6 +145,10 @@
           <ODBCDriver Id="Psqlodbc_9.0_Driver" Name="PostgreSQL Unicode($(var.Platform))" File="psqlodbc35w.dll" />
           <ODBCDriver Id="Psqlodbc_11_newid_Driver_ANSI" Name="PostgreSQL ANSI" File="psqlodbc30a.dll" />
           <ODBCDriver Id="Psqlodbc_11_newid_Driver" Name="PostgreSQL Unicode" File="psqlodbc35w.dll" />
+          <RegistryValue Id="psqlodbc30a.reg.1" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL ANSI" Name="CPTimeout" Type="string" Value="60" />
+          <RegistryValue Id="psqlodbc35w.reg.1" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" Name="CPTimeout" Type="string" Value="60" />
+          <RegistryValue Id="psqlodbc30a.reg.2" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL ANSI($(var.Platform))" Name="CPTimeout" Type="string" Value="60" />
+          <RegistryValue Id="psqlodbc35w.reg.2" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode($(var.Platform))" Name="CPTimeout" Type="string" Value="60" />
 <?else?>
           <RegistryValue Id="psqlodbc30a.reg.1" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" Name="PostgreSQL ANSI" Type="string" Value="Installed" />
           <RegistryValue Id="psqlodbc30a.reg.2" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL ANSI" Name="APILevel" Type="string" Value="1" />
@@ -155,6 +159,7 @@
           <RegistryValue Id="psqlodbc30a.reg.7" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL ANSI" Name="Setup" Type="string" Value="[#psqlodbc30a.dll]" />
           <RegistryValue Id="psqlodbc30a.reg.8" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL ANSI" Name="SQLLevel" Type="string" Value="1" />
           <RegistryValue Id="psqlodbc30a.reg.9" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL ANSI" Name="UsageCount" Type="integer" Value="1" />
+          <RegistryValue Id="psqlodbc30a.reg.10" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL ANSI" Name="CPTimeout" Type="string" Value="60" />
 
           <RegistryValue Id="psqlodbc35w.reg.1" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\ODBC Drivers" Name="PostgreSQL Unicode" Type="string" Value="Installed" />
           <RegistryValue Id="psqlodbc35w.reg.2" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" Name="APILevel" Type="string" Value="1" />
@@ -165,6 +170,7 @@
           <RegistryValue Id="psqlodbc35w.reg.7" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" Name="Setup" Type="string" Value="[#psqlodbc35w.dll]" />
           <RegistryValue Id="psqlodbc35w.reg.8" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" Name="SQLLevel" Type="string" Value="1" />
           <RegistryValue Id="psqlodbc35w.reg.9" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" Name="UsageCount" Type="integer" Value="1" />
+          <RegistryValue Id="psqlodbc35w.reg.10" Root="HKLM" Key="SOFTWARE\ODBC\ODBCINST.INI\PostgreSQL Unicode" Name="CPTimeout" Type="string" Value="60" />
 <?endif?>
         </Component>
 	<!--
-- 
2.28.0.windows.1



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Enabling connection pooling by default
@ 2021-08-23 02:50  Inoue,Hiroshi <[email protected]>
  parent: Vadim Presniak - Consultant <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Inoue,Hiroshi @ 2021-08-23 02:50 UTC (permalink / raw)
  To: Vadim Presniak - Consultant <[email protected]>; +Cc: pgsql-odbc; Andrius Docius <[email protected]>; Zilvinas Susinskas <[email protected]>

Hi Vadim,

I would take care of this patch.

regards,
Hiroshi Inoue

2021年8月20日(金) 20:14 Vadim Presniak - Consultant <[email protected]
>:

> Hello,
>
>
>
> We had been investigating why our application works dramatically slower
> with Postgre SQL DB than MS SQL Server and found that the main reason was
> related to the fact that CPTimeout option is not set for psqlOdbc driver,
> however this option is set by default to 60 for Microsoft ODBC drivers.
> We’ve done simple patch with changes for psqlOdbc driver installer to
> enable this option during driver installation.
> (0001-CPTimeout-option-set-to-60-for-odbc-driver-by-defaul.patch)  Is it
> possible to push this change in master branch?
>
>
>
> This topic was discussed in 2008 (
> https://www.postgresql.org/message-id/F613CCFA0B7146A38D24394E8F29C66C%40andrusnotebook),
> but I could not find final decision for this topic.
>
>
>
> Regards,
>
> Vadim Presniak
>
>
>
> ------------------------------
>
>
> This email, including any attachments, may contain confidential and/or
> proprietary information intended only for the use of the recipient. If you
> are not the intended recipient, any distribution, copying, or use of this
> email or its attachments is prohibited. If you received this email in
> error, please reply to the sender immediately and delete this message and
> any copies.
>
> *Bentley Systems has taken all reasonable steps to ensure that this
> communication is free from viruses, data corruption, and unauthorized
> alteration. Bentley Systems does not accept liability for any damages that
> may be incurred as a result of this or any communication by email*
>
>


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-08-23 02:50 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20 11:14 Enabling connection pooling by default Vadim Presniak - Consultant <[email protected]>
2021-08-23 02:50 ` Inoue,Hiroshi <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox