U124: Current transaction is aborted

Category: Application / User Errors
SQLSTATE: 25P02 (Class 25 — Invalid Transaction State: in_failed_sql_transaction)
Urgency: low

Example Postgres Log Output:

ERROR: current transaction is aborted, commands ignored until end of transaction block
STATEMENT: SELECT 1

Explanation:

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 using ROLLBACK before another query can be performed.

Recommended Action:

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.

Learn More:


Download Free eBook: The Top 6 Postgres Log Events
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →