Re: ADO CommandTimeout vs Postgres statement_timeout parameter

From: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
To: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, Richard Hetherington <hetheringtonrichard(at)hotmail(dot)com>
Cc: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: ADO CommandTimeout vs Postgres statement_timeout parameter
Date: 2016-05-27 08:04:04
Message-ID: 5747FF74.9080406@dream.email.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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(at)hotmail(dot)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(dot)takay(at)jp(dot)fujitsu(dot)com
> <mailto:tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
> To: hetheringtonrichard(at)hotmail(dot)com
> <mailto:hetheringtonrichard(at)hotmail(dot)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
>

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Inoue, Hiroshi 2016-05-27 11:26:28 Re: PostgreSQL: SQLSetPos fails with SetPos update return error.
Previous Message Inoue, Hiroshi 2016-05-27 07:54:24 Re: [patch] fix buffer overrun in logging, and code cleanup