Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b6Cl8-0005Do-1m for pgsql-odbc@arkaria.postgresql.org; Fri, 27 May 2016 08:04:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b6Cl7-0000WJ-Bw for pgsql-odbc@arkaria.postgresql.org; Fri, 27 May 2016 08:04:41 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b6Ckk-00006R-1L for pgsql-odbc@postgresql.org; Fri, 27 May 2016 08:04:18 +0000 Received: from mail2.asahi-net.or.jp ([202.224.39.198]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b6Ckb-0006ME-Gk for pgsql-odbc@postgresql.org; Fri, 27 May 2016 08:04:16 +0000 Received: from [192.168.1.3] (h216161.dynamic.ppp.asahi-net.or.jp [61.114.216.161]) by mail2.asahi-net.or.jp (Postfix) with ESMTP id 7476A17666; Fri, 27 May 2016 17:04:03 +0900 (JST) Subject: Re: ADO CommandTimeout vs Postgres statement_timeout parameter To: "Tsunakawa, Takayuki" , Richard Hetherington References: <0A3221C70F24FB45833433255569204D1F57749A@G01JPEXMBYT05> <0A3221C70F24FB45833433255569204D1F577ABB@G01JPEXMBYT05> <0A3221C70F24FB45833433255569204D1F57AAE6@G01JPEXMBYT05> Cc: "pgsql-odbc@postgresql.org" From: "Inoue, Hiroshi" Message-ID: <5747FF74.9080406@dream.email.ne.jp> Date: Fri, 27 May 2016 17:04:04 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <0A3221C70F24FB45833433255569204D1F57AAE6@G01JPEXMBYT05> Content-Type: multipart/alternative; boundary="------------070503060709060602090609" X-Pg-Spam-Score: -1.6 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org This is a multi-part message in MIME format. --------------070503060709060602090609 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, What does SQL_QUERY_TIMEOUT means for e.g.SQLBulkOperations()? regards, Hiroshi Inoue On 2016/05/26 17:27, Tsunakawa, Takayuki wrote: > > Hello, Richard, Inoue-san, > > Richard, please post to pgsql-odbc ML as much as possible, because I’d > like Inoue-san to have a look. He is currently the only committer of > psqlODBC, and I’m still an apprentice. > > I implemented SQL_QUERY_TIMEOUT, which seems to work. Please find the > attached patch. > > Inoue-san, > > At first, I used CC_send_settings() to execute “SET statement_timeout” > and refactored it. After that, I realized I can use CC_send_query() > and used it instead. However, I’d like the refactored code to be > applied too. > > Regards > > Takayuki Tsunakawa > > *From:*Richard Hetherington [mailto:hetheringtonrichard@hotmail.com] > *Sent:* Friday, May 20, 2016 7:09 PM > *To:* Tsunakawa, Takayuki/綱川貴之 > *Subject:* RE: [ODBC] ADO CommandTimeout vs Postgres statement_timeout > parameter > > Many thanks for you advice. I realised after receiving your email that > I had made a fundamental error - I was logging from a website to my > desktop folder which clearly isn't going to be writable by a Web > Identity Account - oops. > > Attached are 2 log files which I have cleaned up to remove all UID, > PWD, Server values etc. > > You should see that I set the SQL_QUERY_TIMEOUT via the ADO > CommandTimeout = 60 seconds > > This value has been logged but has no effect on the long running query. > [7212-0.181]SetStmtOption: SQL_QUERY_TIMEOUT, vParam = 60 > > I hope this is useful. > > If you need anything esle, let me know. > > Many thanks and have a good weekend, > > **RICHARD** > > ------------------------------------------------------------------------ > > From: tsunakawa.takay@jp.fujitsu.com > > To: hetheringtonrichard@hotmail.com > > Subject: RE: [ODBC] ADO CommandTimeout vs Postgres statement_timeout > parameter > Date: Fri, 20 May 2016 02:39:30 +0000 > > Hello, > > If SQL_QUERY_TIMEOUT is set on the connection or statement, > mylog_xxx.log will have entries like this: > > [140168204601088]PGAPI_SetConnectAttr for 0x8d5360: 0 0xa > > [140168204601088]PGAPI_SetConnectOption: entering fOption = 0 vParam = 10 > > [140168204601088]SetStmtOption: SQL_QUERY_TIMEOUT, vParam = 10 > > ... > > [140168204601088][[SQLSetStmtAttr]] Handle=0x8e2110 0,10 > > [140168204601088]PGAPI_SetStmtAttr Handle=0x8e2110 0,10(0xa) > > [140168204601088]PGAPI_SetStmtOption: entering... > > [140168204601088]SetStmtOption: SQL_QUERY_TIMEOUT, vParam = 10 > > I'm not sure about the cause of your logging failure, but perhaps you > will be able to log to another directory by creating the following > registry value: > > HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\ name>\Logdir > > type: REG_SZ > > value: directory path > > Regards > > Takayuki Tsunakawa > --------------070503060709060602090609 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi,

What does SQL_QUERY_TIMEOUT means for e.g.SQLBulkOperations()?

regards,
Hiroshi Inoue

On 2016/05/26 17:27, Tsunakawa, Takayuki wrote:

Hello, Richard, Inoue-san,

 

Richard, please post to pgsql-odbc ML as much as possible, because I’d like Inoue-san to have a look.  He is currently the only committer of psqlODBC, and I’m still an apprentice.

 

I implemented SQL_QUERY_TIMEOUT, which seems to work.  Please find the attached patch.

 

Inoue-san,

At first, I used CC_send_settings() to execute “SET statement_timeout” and refactored it.  After that, I realized I can use CC_send_query() and used it instead.  However, I’d like the refactored code to be applied too.

 

 

Regards

Takayuki Tsunakawa

 

From: Richard Hetherington [mailto:hetheringtonrichard@hotmail.com]
Sent: Friday, May 20, 2016 7:09 PM
To: Tsunakawa, Takayuki/
綱川貴之
Subject: RE: [ODBC] ADO CommandTimeout vs Postgres statement_timeout parameter

 

Many thanks for you advice. I realised after receiving your email that I had made a fundamental error - I was logging from a website to my desktop folder which clearly isn't going to be writable by a Web Identity Account - oops.

Attached are 2 log files which I have cleaned up to remove all UID, PWD, Server values etc.

You should see that I set the SQL_QUERY_TIMEOUT via the ADO CommandTimeout = 60 seconds

This value has been logged but has no effect on the long running query.
[7212-0.181]SetStmtOption: SQL_QUERY_TIMEOUT, vParam = 60

I hope this is useful.

If you need anything esle, let me know.

Many thanks and have a good weekend,

RICHARD


From: tsunakawa.takay@jp.fujitsu.com
To: hetheringtonrichard@hotmail.com
Subject: RE: [ODBC] ADO CommandTimeout vs Postgres statement_timeout parameter
Date: Fri, 20 May 2016 02:39:30 +0000

Hello,

 

If SQL_QUERY_TIMEOUT is set on the connection or statement, mylog_xxx.log will have entries like this:

 

[140168204601088]PGAPI_SetConnectAttr for 0x8d5360: 0 0xa

[140168204601088]PGAPI_SetConnectOption: entering fOption = 0 vParam = 10

[140168204601088]SetStmtOption: SQL_QUERY_TIMEOUT, vParam = 10

...

[140168204601088][[SQLSetStmtAttr]] Handle=0x8e2110 0,10

[140168204601088]PGAPI_SetStmtAttr Handle=0x8e2110 0,10(0xa)

[140168204601088]PGAPI_SetStmtOption: entering...

[140168204601088]SetStmtOption: SQL_QUERY_TIMEOUT, vParam = 10

 

I'm not sure about the cause of your logging failure, but perhaps you will be able to log to another directory by creating the following registry value:

 

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\<your ODBC driver name>\Logdir

type: REG_SZ

value: directory path

 

Regards

Takayuki Tsunakawa

 

--------------070503060709060602090609--