U124: Current transaction is aborted
SQLSTATE: 25P02 (Class 25 — Invalid Transaction State: in_failed_sql_transaction)
Example Postgres Log Output:
ERROR: current transaction is aborted, commands ignored until end of transaction block STATEMENT: SELECT 1
This log event happens when a transaction fails due to a potentially unrelated error, and you try to run another query in the failed transaction.
As a general rule, after an error, the transaction state needs to be cleaned up
ROLLBACK before another query can be performed.
Usually this is caused by applications not handling errors in transactions correctly, and keeping a transaction open instead of rolling it back.
This may have other unintended circumstances, so its highly recommended to fix your application code to respond correctly to failures in transactions.
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →