Thread: psqlODBC 09.05.0300 (x86) - problem with SQL_QUERY_TIMEOUT

psqlODBC 09.05.0300 (x86) - problem with SQL_QUERY_TIMEOUT

From
"Jan-Peter Seifert"
Date:
Hello,

it looks like SQL_QUERY_TIMEOUT is on by default - causing dead connections with long running statements:

"SQLSTATE = 00000 Native Error = 26 Could not send Query(connection dead)"

I tested with 9.3.400 (without problems) as well.

How can I disable it? Adding "statement_timeout = 0" to the "Connect Settings" field on Advance Options Page 2?

Could you tell me, please?

Thank you very much!

Best regards,

Peter


Re: psqlODBC 09.05.0300 (x86) - problem with SQL_QUERY_TIMEOUT

From
"Tsunakawa, Takayuki"
Date:
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Jan-Peter Seifert
> it looks like SQL_QUERY_TIMEOUT is on by default - causing dead connections
> with long running statements:
> 
> "SQLSTATE = 00000 Native Error = 26 Could not send Query(connection dead)"

No, SQL_QUERY_TIMEOUT is off by default.
I've just confirmed that "SET statement_timeout" is not issued when I executed "SELECT pg_sleep(60);" with isql command
ofthe unixODBC.  In addition, SQL_QUERY_TIMEOUT just terminates the query, retaining the database connection.  Your
messageseems to show that the connection was terminated.
 

Could you show the mylog output?

Regards
Takayuki Tsunakawa



Re: psqlODBC 09.05.0300 (x86) - problem with SQL_QUERY_TIMEOUT

From
"Jan-Peter Seifert"
Date:
Hello Tsunakawa-san,

thank you very much for your reply!

> No, SQL_QUERY_TIMEOUT is off by default.

How would you set it then - via connect settings?

> I've just confirmed that "SET statement_timeout" is not issued when I executed "SELECT pg_sleep(60);" with isql
commandof the unixODBC.  In addition, SQL_QUERY_TIMEOUT just terminates the query, retaining the database connection.
Yourmessage seems to show that the connection was terminated. 

You are right. It seems that there was a network problem when I tried the update before. It completed using v9.5.300
withoutproblems. 

> Could you show the mylog output?

I have the mylog output. However, there was another problem. When using 9.5.300 all the the check boxes for the logs
weredisabled (greyed out) - even when creating a new ODBC DSN. When using 9.3.400 everything is okay. 

Best regards,

Peter


Re: psqlODBC 09.05.0300 (x86) - problem with SQL_QUERY_TIMEOUT

From
"Tsunakawa, Takayuki"
Date:
> From: pgsql-odbc-owner@postgresql.org
> [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Jan-Peter Seifert
> > No, SQL_QUERY_TIMEOUT is off by default.
> 
> How would you set it then - via connect settings?

psqlODBC follows the ODBC standard; i.e. the function call SQLSetStmtAttr(SQL_QUERY_TIMEOUT, timeout_seconds) does
that. psqlODBC also allows setting with SQLSetConnectAttr().  ADO's CommandTimeout uses these functions behind the
scenes.



> > I've just confirmed that "SET statement_timeout" is not issued when I
> executed "SELECT pg_sleep(60);" with isql command of the unixODBC.  In
> addition, SQL_QUERY_TIMEOUT just terminates the query, retaining the
> database connection.  Your message seems to show that the connection was
> terminated.
> 
> You are right. It seems that there was a network problem when I tried the
> update before. It completed using v9.5.300 without problems.

I'm relieved to hear that.


> > Could you show the mylog output?
> 
> I have the mylog output. However, there was another problem. When using
> 9.5.300 all the the check boxes for the logs were disabled (greyed out)
> - even when creating a new ODBC DSN. When using 9.3.400 everything is okay.

I've just reproduced the grey-out phenomenon, too.  It doesn't happen with at least 09.05.0100.  Having a quick look at
thediff between 09.05.0100 and 09.05.0300, I couldn't find any suspicious modification.  I'd like to ask for help from
otherdevelopers.
 


Regards
Takayuki Tsunakawa



Re: psqlODBC 09.05.0300 (x86) - problem with SQL_QUERY_TIMEOUT

From
"Tsunakawa, Takayuki"
Date:
Hi, Inoue-san,

> I have the mylog output. However, there was another problem. When using
> 9.5.300 all the the check boxes for the logs were disabled (greyed out)
> - even when creating a new ODBC DSN. When using 9.3.400 everything is okay.

The attached is a patch to fix this.  Could you commit this?

Regards
Takayuki Tsunakawa


Attachment

Re: psqlODBC 09.05.0300 (x86) - problem with SQL_QUERY_TIMEOUT

From
"Inoue, Hiroshi"
Date:
Hi,

On 2016/07/12 11:55, Tsunakawa, Takayuki wrote:
> Hi, Inoue-san,
>
>> I have the mylog output. However, there was another problem. When using
>> 9.5.300 all the the check boxes for the logs were disabled (greyed out)
>> - even when creating a new ODBC DSN. When using 9.3.400 everything is okay.
> The attached is a patch to fix this.  Could you commit this?

Hmm, I already committed the fix.

regards,
Hiroshi Inoue


Re: psqlODBC 09.05.0300 (x86) - problem with SQL_QUERY_TIMEOUT

From
"Tsunakawa, Takayuki"
Date:
> From: Inoue, Hiroshi [mailto:h-inoue@dream.email.ne.jp]
> Hmm, I already committed the fix.

Oh, I should have checked the git log... Thanks.

Regards
Takayuki Tsunakawa


Re: psqlODBC 09.05.0300 (x86) - problem with SQL_QUERY_TIMEOUT

From
"Jan-Peter Seifert"
Date:
Hello,

> Hmm, I already committed the fix.

it's good to know that this bug has been fixed.

Thank you very much!

Best regards,

Peter