From: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> |
---|---|
To: | 'Tatsuo Ishii' <ishii(at)sraoss(dot)co(dot)jp> |
Cc: | "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, "david(at)fetter(dot)org" <david(at)fetter(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Statement timeout behavior in extended queries |
Date: | 2017-04-05 07:03:02 |
Message-ID: | 0A3221C70F24FB45833433255569204D1F6C0C16@G01JPEXMBYT05 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org] On Behalf Of Tatsuo Ishii
> Since pgproto is a dumb protocol machine, it does not start a transaction
> automatically (user needs to explicitly send a start transaction command
> via either simple or extended query). In this particular case no explicit
> transaction has started.
>
Then, the following sequence should have occurred. The test result is valid.
# Execute statement which takes 2 seconds.
'P' "S1" "SELECT pg_sleep(2)" 0
-> start transaction T1
'B' "S2" "S1" 0 0 0
'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
# Issue Sync message
'S'
-> rolled back T1, so statement_timeout reverted to 3s
# Receive response from backend
'Y'
# Execute statement which takes 2 seconds (statement timeout expected).
'P' "S3" "SELECT pg_sleep(2)" 0
-> start transaction T2
'B' "S2" "S3" 0 0 0
'E' "S2" 0
# Issue Sync message
'S'
-> committed T2
Regards
Takayuki Tsunakawa
From | Date | Subject | |
---|---|---|---|
Next Message | Kuntal Ghosh | 2017-04-05 07:05:21 | Re: strange parallel query behavior after OOM crashes |
Previous Message | Andres Freund | 2017-04-05 07:02:49 | Re: partitioned tables and contrib/sepgsql |