Recovering from failed transaction - Mailing list pgsql-general

From Brian Crowell
Subject Recovering from failed transaction
Date
Msg-id CAAQkdDrBoW3UUdGVRzdvqOe0-R+jKfjWLe66wOSmKogd8Po0ww@mail.gmail.com
Whole thread Raw
Responses Re: Recovering from failed transaction  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
I feel dumb asking this question, but I can't seem to find the answer online.

I'm running serializable transactions, and so naturally, they will
sometimes fail with the error "could not serialize access due to
concurrent update."

But then I try to issue a ROLLBACK so I can continue using the
connection, and I get error 25P02: "current transaction is aborted,
commands ignored until end of transaction block."

...doesn't "ROLLBACK" end a transaction block? What does Postgres want
here? How can I retry without closing the connection altogether?

--Brian


pgsql-general by date:

Previous
From: "Aggarwal, Ajay"
Date:
Subject: Re: replication timeout in pg_basebackup
Next
From: Jeff Janes
Date:
Subject: Re: Recovering from failed transaction