Обсуждение: PG/DBI: 'NOTICE: UserAbortTransactionBlock and not in in-progress state'

Поиск
Список
Период
Сортировка

PG/DBI: 'NOTICE: UserAbortTransactionBlock and not in in-progress state'

От
Markus Wagner
Дата:
Hi,

I am using PG 6.5.1 and DBI. My Perl programs always print to stderr:

"NOTICE: UserAbortTransactionBlock and not in in-progress state" or
"NOTICE: EndTransactionBlock and not inprogress/abort state"

I tried to do <stmthandle> -> finish and <dbhandle> -> commit after each
query, but the messages still appear.

Any hints?

Thanks,

Markus



Re: PG/DBI: 'NOTICE: UserAbortTransactionBlock and not in in-progress state'

От
Ed Loehr
Дата:
Markus Wagner wrote:
> 
> Hi,
> 
> I am using PG 6.5.1 and DBI. My Perl programs always print to stderr:
> 
> "NOTICE: UserAbortTransactionBlock and not in in-progress state" or
> "NOTICE: EndTransactionBlock and not inprogress/abort state"
> 
> I tried to do <stmthandle> -> finish and <dbhandle> -> commit after each
> query, but the messages still appear.
> 
> Any hints?

I think that happens if the backend aborted (elogged) with an ERROR
message and you did not start a new transaction.  ERROR kills the current
transaction altogether in 6.5.*, IIRC.

Regards,
Ed Loehr


Re: PG/DBI: 'NOTICE: UserAbortTransactionBlock and not in in-progress state'

От
Tom Lane
Дата:
Markus Wagner <mawagner@mail.uni-mainz.de> writes:
> I am using PG 6.5.1 and DBI. My Perl programs always print to stderr:
> "NOTICE: UserAbortTransactionBlock and not in in-progress state" or
> "NOTICE: EndTransactionBlock and not inprogress/abort state"
> I tried to do <stmthandle> -> finish and <dbhandle> -> commit after each
> query, but the messages still appear.

I think you're doing too much rather than too little.  Those notices
suggest that you're sending out an extra ABORT or COMMIT command after
the transaction's already been aborted/committed.

IIRC, DBI has an autocommit feature that sends out COMMITs for you.
If you have that turned on, *and* you are explicitly committing, then
that's probably the cause of the extra commits.  Get rid of one or
the other.
        regards, tom lane