Re: [bug fix] Savepoint-related statements terminates connection
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-05-17T07:26:25Z
Lists: pgsql-hackers
On Fri, Mar 31, 2017 at 9:58 PM, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote: > Then the question is why not to allow savepoints as well? For that we > have to fix transaction block state machine. I agree with this argument. I have been looking at the patch, and what it does is definitely incorrect. Any query string including multiple queries sent to the server is executed as a single transaction. So, while the current behavior of the server is definitely incorrect for savepoints in this case, the proposed patch does not fix anything but actually makes things worse. I think that instead of failing, savepoints should be able to work properly. As you say cursors are handled correctly, savepoints should fall under the same rules. -- Michael
Commits
-
Improve documentation about behavior of multi-statement Query messages.
- b976499480bd 11.0 landed
-
Fix handling of savepoint commands within multi-statement Query strings.
- 6eb52da3948d 11.0 landed
-
Arrange for PreventTransactionChain to reject commands submitted as part
- 4f896dac17f7 8.3.0 cited