DBAtlas · Database operations atlas

40003: statement_completion_unknown

PostgreSQL

What does it mean?

The outcome of the transaction is unknown; the connection to the server dropped before it was clear whether the transaction completed (especially during COMMIT). The client cannot know for certain whether the changes are durable. Belongs to Class 40 (transaction_rollback).

Why does it happen?

The network dropped, the server crashed or a failover occurred after COMMIT was sent but before the response arrived. The transaction may have completed on the server, or it may have been rolled back.

How to fix it

Do not blindly retry the transaction; first verify whether it was actually applied (e.g. by querying for the expected row). Design transactions to be idempotent; use unique business keys/idempotency keys. Implement robust reconnect and validation logic in the connection pool.

Open in DBAtlas →

More from this engine