Re: Bug #504: multiple cursors cause transaction problems - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug #504: multiple cursors cause transaction problems
Date
Msg-id 2428.1004474732@sss.pgh.pa.us
Whole thread Raw
In response to Bug #504: multiple cursors cause transaction problems  (pgsql-bugs@postgresql.org)
List pgsql-bugs
pgsql-bugs@postgresql.org writes:
> I'm trying to query several tables with different cursors within a c++
> program. I use ecpg -t to compile the code (see example below). When I
> run the code I can open anf fetch the first cursor,. However after the
> first cursor is exhausted (i.e.,sqlca.sqlcode == ECPG_NOT_FOUND) and
> the loop finished, any attempt to open a new cursor gets the following
> error:

> -601: current transaction is aborted, queries ignored until end of transact

You have omitted to tell us what error is causing the backend to abort
the transaction in the first place.  If ecpg is failing to tell you
about an error reported by the backend (and you've not simply missed
a check for error somewhere you need one), that might be a bug we need
to fix.

If you're not sure what's going on, try turning on query logging at the
postmaster and examine the postmaster log to see which query is
provoking what error.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Triggers cause backend crash
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #506: serializable transaction does may commit in jdbc