I'm using session with a room reservation app that uses SQL Alchemy. The app until now works fine, but, I tested with 2 persons using it at the same time, using different user accounts, and the reserves can be done at the same room, and hour of the day.
This didn't happen when using just one account, i tested the room check code a lot, so must be a concurrency problem (both users use the check when is empty and the make it). I'm using PostgreSQL as DBMS, is there a way lock the table while making the commit to the DB and then unlock it when it's done??