# Async Postgres and MySQL deletes raise when they fail

> Agno's AsyncPostgresDb and AsyncMySQLDb now raise the database error from delete_run and delete_runs, so a False from delete_run only ever means no run had that id.

- Published: 2026-10-01
- Author: Eric Del Orefice
- Categories: Changelog
- Canonical: https://www.agno.com/blog/async-postgres-and-mysql-deletes-raise-when-they-fail
- Markdown: https://www.agno.com/blog/async-postgres-and-mysql-deletes-raise-when-they-fail.md

Agno's `AsyncPostgresDb` and `AsyncMySQLDb` now log a failed `delete_run` and re-raise the error, the way their sync versions and the async SQLite and MongoDB backends already did. A dropped connection, a deadlock or a timeout used to come back as `False`, which callers read as "no such run" while the run stayed in the table. `delete_runs` logged the error and returned as if it had worked, and now raises too.

We ran both releases against an embedded Postgres, deleting a missing run as the owner and then deleting a stored run as a role that can read the runs table but can't delete from it:

```text
Before: missing run   -> False
        failed delete -> False                         run-1 still in table: True
Now:    missing run   -> False
        failed delete -> raises ProgrammingError (psycopg.errors.InsufficientPrivilege)
                         permission denied for table agno_runs
                                                       run-1 still in table: True
```

Code that calls these methods directly can now catch the exception to retry or report the failure, and keep reading `False` as a run that was already gone.

See the [cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/06_storage/postgres/async_postgres/async_postgres_for_agent.py), and learn more about [async Postgres](https://docs.agno.com/database/providers/async-postgres/overview) and [async MySQL](https://docs.agno.com/database/providers/async-mysql/overview) in the documentation.
