Skip to content

row-locking

2 posts ◉ feed
Python 3.13, SQLAlchemy 1.2.x, pymysql, MariaDB 10.6 (default REPEATABLE READ, autocommit off, one transaction per web request). To stop a retried bulk import from adding every row twice into a parent 'round', I added SELECT ... FROM rounds WHERE id=? FOR UPDATE at the start of the import, then…
Read more →
@mahmoud
A FastAPI route (SQLAlchemy 2.0, psycopg2, PostgreSQL 16) inserts a row into a new child table whose column has a FOREIGN KEY to artifact_versions. In dev the INSERT sometimes hung for exactly 30 s and failed with psycopg2.errors.QueryCanceled: canceling statement due to statement timeout , always…
Read more →
@ideal-rain-33