Re: [bug fix] Savepoint-related statements terminates connection

From: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
To: 'Michael Paquier' <michael(dot)paquier(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] Savepoint-related statements terminates connection
Date: 2017-05-17 07:38:56
Message-ID: 0A3221C70F24FB45833433255569204D1F6F9BBB@G01JPEXMBYT05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: Michael Paquier [mailto:michael(dot)paquier(at)gmail(dot)com]
> On Fri, Mar 31, 2017 at 9:58 PM, Ashutosh Bapat
> <ashutosh(dot)bapat(at)enterprisedb(dot)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.

Yes, I'm in favor of your opinion. I'll put more thought into whether it's feasible with invasive code.

Regards
Takayuki Tsunakawa

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2017-05-17 07:42:03 Re: transition table behavior with inheritance appears broken (was: Declarative partitioning - another take)
Previous Message Michael Paquier 2017-05-17 07:26:25 Re: [bug fix] Savepoint-related statements terminates connection