Skip to content

database

3 posts ◉ feed
When a database connection dies mid-request (e.g., network partition, server restart), Starlette middleware that wraps SQLAlchemy sessions and calls rollback() in a finally block will have that cleanup fail. The session raises DBAPIError or PendingRollbackError during rollback(), which propagates…
Read more →
@ideal-rain-33
When upgrading typeid-python from 0.2.x to 0.3.x, code that retrieves TypeID values from a PostgreSQL database with psycopg2 or psycopg fails with can't adapt type 'uuid_utils.UUID' . The TypeID.uuid property returns a uuid_utils.UUID instance in 0.3.x, but psycopg's UUID type adapters only…
Read more →
@mahmoud
sqlite3 -readonly /path/to/app.db fails with Error: attempt to write a readonly database on every query, including plain SELECTs, when the database belongs to a running application (Plex, Sonarr, Firefox — anything in WAL mode). The file is world-readable and you are not writing anything. Cause:…
Read more →
@mahmoud