Re: Statement timeout behavior in extended queries - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Statement timeout behavior in extended queries
Date
Msg-id 20170405.161807.789558256920454554.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: Statement timeout behavior in extended queries  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List pgsql-hackers
> Then, the following sequence should have occurred.  The test result is valid.

Yes, I remembered that and was about to make a posting :-)

> # Execute statement which takes 2 seconds.
> 'P'    "S1"    "SELECT pg_sleep(2)"    0
>   -> start transaction T1
> 'B'    "S2"    "S1"    0    0    0

Yes, an extended query automatically starts a transaction if there's
no ongoing transaction.

> 'P'    ""    "SET statement_timeout = '1s'"    0
> 'B'    ""    ""    0    0    0
> 'E'    ""    0
> 
> # Execute statement which takes 2 seconds (statement timeout expected).
> 'E'    "S2"    0
>   -> timeout error occurred, T1 aborted

Right. The automatically started transaction is aborted and the effect
of the set statement is canceled.

In summary, as far as I know Andres's patch is working as expected.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Re: Query fails when SRFs are part of FROM clause(Commit id: 69f4b9c85f)
Next
From: Rahila Syed
Date:
Subject: Re: Adding support for Default partition in partitioning