pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
statement timeout with psqlODBC 09.05.300+
3+ messages / 2 participants
[nested] [flat]

* statement timeout with psqlODBC 09.05.300+
@ 2018-01-25 15:51 michael <michael.michaud@ign.fr>
  2018-01-25 17:15 ` RE: statement timeout with psqlODBC 09.05.300+ Richard Hetherington <hetheringtonrichard@hotmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: michael @ 2018-01-25 15:51 UTC (permalink / raw)
  To: pgsql-odbc

Hi,

This ticket is related to
http://www.postgresql-archive.org/BUG-odbc-statement-timeout-gets-set-to-30000-td5992591.html

The client using the ODBC Driver is on Windows 7, must be x86 compatible,
and connect to a 9.6 postgresql database.
from 09.05.300+ version of the ODBC driver x86 (tested up to 10.01), queries
which used to work fine with drivers 08.x now throw "ERROR: canceling
statement due to statement timeout;"

It seems that there is now a default setting for statement timeout coming
with 9.5+ versions of the driver (less than 1 mn), and I did not find any
way to change this setting.
I tried to find a key in the Windows Registry Database or to set the timeout
in the connection string but did not find good documentation and did not
succeeded.
Any help woul be appreciated




--
Sent from: http://www.postgresql-archive.org/PostgreSQL-odbc-f2186591.html




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

* RE: statement timeout with psqlODBC 09.05.300+
  2018-01-25 15:51 statement timeout with psqlODBC 09.05.300+ michael <michael.michaud@ign.fr>
@ 2018-01-25 17:15 ` Richard Hetherington <hetheringtonrichard@hotmail.com>
  2018-01-26 14:13   ` RE: statement timeout with psqlODBC 09.05.300+ Richard Hetherington <hetheringtonrichard@hotmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Richard Hetherington @ 2018-01-25 17:15 UTC (permalink / raw)
  To: michael <michael.michaud@ign.fr>; pgsql-odbc

I reported this issue a couple of years ago when I figured out the ODBC Command Timeout value configured on a connection was being ignored. I found a work around to prepend this to all queries needing a custom configured COMMAND timeout.

SET statement_timeout = ( YourCommandTimeoutInSeconds * 1000 );
SELECT * FROM bla;

Hope this helps.

Regards,


Richard Hetherington
Senior Web Developer

Aspire HE Technologies Ltd
(Formally Aztec Retail Solutions Limited) 
c/o John Smith & Son Group Ltd
Ash House
Headlands Business Park
Ringwood,
Hampshire
BH24 3PB
Tel: +44 (0)1425 485957 ext. 315



-----Original Message-----
From: michael [mailto:michael.michaud@ign.fr] 
Sent: 25 January 2018 15:51
To: pgsql-odbc@postgresql.org
Subject: statement timeout with psqlODBC 09.05.300+

Hi,

This ticket is related to
https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.postgresql-archive.org%2FBUG-od...

The client using the ODBC Driver is on Windows 7, must be x86 compatible, and connect to a 9.6 postgresql database.
from 09.05.300+ version of the ODBC driver x86 (tested up to 10.01), queries which used to work fine with drivers 08.x now throw "ERROR: canceling statement due to statement timeout;"

It seems that there is now a default setting for statement timeout coming with 9.5+ versions of the driver (less than 1 mn), and I did not find any way to change this setting.
I tried to find a key in the Windows Registry Database or to set the timeout in the connection string but did not find good documentation and did not succeeded.
Any help woul be appreciated




--
Sent from: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.postgresql-archive.org%2FPostgr...





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

* RE: statement timeout with psqlODBC 09.05.300+
  2018-01-25 15:51 statement timeout with psqlODBC 09.05.300+ michael <michael.michaud@ign.fr>
  2018-01-25 17:15 ` RE: statement timeout with psqlODBC 09.05.300+ Richard Hetherington <hetheringtonrichard@hotmail.com>
@ 2018-01-26 14:13   ` Richard Hetherington <hetheringtonrichard@hotmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Richard Hetherington @ 2018-01-26 14:13 UTC (permalink / raw)
  To: Michael Michaud <Michael.Michaud@ign.fr>; pgsql-odbc

Hi Michael, the statement_timeout value is in milliseconds, however if setting directly against the Connection then it is in seconds. I guess behind the scenes the value is converted to milliseconds before issuing the SET statement_timeout command to Postgres.

Regards,

Richard

-----Original Message-----
From: Michael Michaud [mailto:Michael.Michaud@ign.fr] 
Sent: 25 January 2018 19:11
To: pgsql-odbc@postgresql.org
Subject: RE : statement timeout with psqlODBC 09.05.300+

Thanks for the quick answer.

Our codebase is rather large and old, and prepending a SQL commands to all existing queries would really be annoying. But anyway, thank you for the tip. I learn two things from it
- setting the statement_timeout just before the query overwrites the default setting of the driver
- the timeout setting is in milliseconds, not in seconds.

Michaël
________________________________________
De : Richard Hetherington [hetheringtonrichard@hotmail.com] Date d'envoi : jeudi 25 janvier 2018 18:15 À : Michael Michaud; pgsql-odbc@postgresql.org Objet : RE: statement timeout with psqlODBC 09.05.300+

I reported this issue a couple of years ago when I figured out the ODBC Command Timeout value configured on a connection was being ignored. I found a work around to prepend this to all queries needing a custom configured COMMAND timeout.

SET statement_timeout = ( YourCommandTimeoutInSeconds * 1000 ); SELECT * FROM bla;

Hope this helps.

Regards,


Richard Hetherington
Senior Web Developer

Aspire HE Technologies Ltd
(Formally Aztec Retail Solutions Limited) c/o John Smith & Son Group Ltd Ash House Headlands Business Park Ringwood, Hampshire
BH24 3PB
Tel: +44 (0)1425 485957 ext. 315



-----Original Message-----
From: michael [mailto:michael.michaud@ign.fr]
Sent: 25 January 2018 15:51
To: pgsql-odbc@postgresql.org
Subject: statement timeout with psqlODBC 09.05.300+

Hi,

This ticket is related to
https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.postgresql-archive.org%2FBUG-od...

The client using the ODBC Driver is on Windows 7, must be x86 compatible, and connect to a 9.6 postgresql database.
from 09.05.300+ version of the ODBC driver x86 (tested up to 10.01), queries which used to work fine with drivers 08.x now throw "ERROR: canceling statement due to statement timeout;"

It seems that there is now a default setting for statement timeout coming with 9.5+ versions of the driver (less than 1 mn), and I did not find any way to change this setting.
I tried to find a key in the Windows Registry Database or to set the timeout in the connection string but did not find good documentation and did not succeeded.
Any help woul be appreciated




--
Sent from: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.postgresql-archive.org%2FPostgr...






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


end of thread, other threads:[~2018-01-26 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-25 15:51 statement timeout with psqlODBC 09.05.300+ michael <michael.michaud@ign.fr>
2018-01-25 17:15 ` Richard Hetherington <hetheringtonrichard@hotmail.com>
2018-01-26 14:13   ` Richard Hetherington <hetheringtonrichard@hotmail.com>

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