Re: [GENERAL] Error with DefineSavepoint:Unexpected state STARTED - Mailing list pgsql-general

From Michael Paquier
Subject Re: [GENERAL] Error with DefineSavepoint:Unexpected state STARTED
Date
Msg-id CAB7nPqSsPnF3Thfqj8C_L6=k48WUh-ScOV=wVL4cgXV2AstT8A@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] Error with DefineSavepoint:Unexpected state STARTED  (Computer Study <computerstudy2010@gmail.com>)
List pgsql-general
On Tue, Jun 20, 2017 at 11:12 AM, Computer Study
<computerstudy2010@gmail.com> wrote:
> The UI application is to add/remove some permissions through a listbox  for
> a certain user. For any add/remove, it will first delete all records for
> this certain user in the table, then insert the values chose from UI.
>
> In my code snippet, it first execute the DELETE, then execute multiple
> INSERT to insert selected options into the table. After all done, commit.
>
> The server is in remote and I don't have detailed logs at this moment. Will
> try to ask for that.
>
> My question:  for that error 'DefineSavepoint: unexpected state STARTED',
> not quite sure happens in which step? In the middle of DELETE or INSERT?

This error has been around for a while, and funnily you are the second
reporter of this issue within a couple of weeks:
https://www.postgresql.org/message-id/0A3221C70F24FB45833433255569204D1F6BE40D@G01JPEXMBYT05
I have been thinking a bit about how to fix that, and wondered about
using a new transaction status to track that, but that finished by
being rather intrusive..
--
Michael


pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: [GENERAL] Streaming replication bandwith per table
Next
From: Osahon Oduware
Date:
Subject: [GENERAL] Table Updatable By Trigger Only