> you should do a locking read on that something else
How to do this tho? Do you mean like this?
BEGIN TRANSACTION
// all concerned rows in the select statement
SELECT * FROM A, B... FOR SHARE;
// update relevant rows
UPDATE A SET x = true ... FOR UPDATE;
COMMIT
END