Re: Error with DefineSavepoint:Unexpected state STARTED

From: Computer Study <computerstudy2010(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Error with DefineSavepoint:Unexpected state STARTED
Date: 2017-06-20 02:12:43
Message-ID: CAH2-V636Wp0diU_=iegsA9tPP1i05L1dRsWf+E8AecYDLZuZag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks Tom.

The version of Postgres is: 9.4.7

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?

On Mon, Jun 19, 2017 at 9:43 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Computer Study <computerstudy2010(at)gmail(dot)com> writes:
> > I am working on a project of DB migration from Oracle to Postgres. The
> > application is working well with Oracle. But when switch to Postgres,
> some
> > SQL executionss couldn't finish and got an error like:
>
> > FATAL: DefineSavepoint: unexpected state STARTED
> > STATEMENT: SAVEPOINT_per_query_svp;DEALLOCATE
> > "_PLAN04824560";RELEASE_per_query_SVP_
>
> Well, that's pretty interesting, but you haven't provided nearly enough
> information for anyone else to reproduce the problem. (No, a snippet of
> C++ that depends on undescribed subroutines and uncertain context doesn't
> do it.)
>
> Perhaps you could turn on log_statement = all and capture the SQL that's
> actually being sent to the server by this program?
>
> Also, what version of Postgres is this exactly?
>
> > Any suggestions to fix this issue?
>
> https://wiki.postgresql.org/wiki/Guide_to_reporting_problems
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2017-06-20 04:30:12 Re: Streaming replication bandwith per table
Previous Message Tom Lane 2017-06-20 01:43:30 Re: Error with DefineSavepoint:Unexpected state STARTED